Hi All,
I am having a simple web service method which returns JSON serialized response. The attribute to web method is
[WebMethod, ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
As security of the return data is not a problem, I am Get enabling the HTTP response.
On the client (browser) end, my code is as belo...
Hello.
I need a simple search form on my Drupal site but I can't figure out the best way to get it done. Basically I have a content type with a couple of different fields and I want my form to search in both the title and the body and then return a list with the title its picture and the stripped body.
I have tried with Views and it wo...
I'm writing some AJAX; the server returns JSON (that I also wrote, and as such is sanitary JSON). Under these conditions it seems I can use eval just fine, however I worry that there may be some sort of man in the middle attack on my clients, substituting their JSON for mine. I suppose if there is a man in the middle, they can just as ea...
Howdy, I got a page loaded with $.ajax() jQuery method.
Basically, I got a search form on this page that updates results.
Now wondering... How to submit AJAX form on that page? I tried to use window.location.href and not provide url in $.ajax() method but it loads (on success) the main page.
Any ideas?
...
I am using GM_xmlhttpRequest (greasemonkey xmlhttpRequest) to communicate with my app. Every half second it sends some json to update the status of a page. I am running 3 pages in FireFox. Using netstat -a i got these results.
This is over 200 lines. Why am i using so many ports!?! How can i... not do this? and still communicate with my...
i think this type of questions already asked before and the solutions suggest that you should use Windows.location.hash
but i dont know at what instance of program i have to do this while adding the history point or in the navigate event of script manager(i mean calling javascript function from code behind)
Some people suggest that we ha...
var array = new Array();
$.get('comics.txt', function(data) {
array = data.split(",");
for(var i = 0; i < array.length; i++)
{
var $page = array[i];
$.ajax({
url: $page,
success: function(data) {
alert(data);
}
});
}
});
comics.txt is a file whi...
Hi,
Currently i am working on div based remote page calling method
means i have to call another file in my div
actually i have 1 buttons as button when i clicked on that it has url for replacing currently opened page by another . I am working on cakephp and in localhost
i have simple iframe.html in htdocs and
song folder(in cakephp) ...
I'm working on a completely ajax-driven application where all requests pass through what basically amounts to a main controller which, at its bare bones, looks something like this:
if(strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
fetch($page);
}
Is this generally sufficient to protect against cross-site requ...
Hi
I have a problem.I have a 'demo' controller with 'demo' action what get a parameter, and i want to give them in javascript.
aspx:
<script type="text/javascript">
function openDefault(miez) {
var manager1 = $find("<%= RadWindowManager2.ClientID %>");
var str = "/demo/demo/" + miez;
manager1.open(str3, "RadWindow...
I've noticed the images on mashable.com fade in as I scroll down the page. I guess they are loaded with AJAX to reduce the page weight in the beginning.
Is there a jquery plugin for doing this? What's the best way to add this feature to my website?
thanks
...
When i am setting the tabcontainer first tab as active tab through javascript with the following code :
var tc = document.getElementById('<%= tabContainer.ClientID %>');
tc.firstChild.lastChild.style.visibility = "hidden";
tc.set_activeTabIndex(0);
i am getting the exception like:
Propert or method not supported with this object.
...
Is there any chance to observe within the prototype framework if a dom element has been updated by Ajax.Updater?
Instead of writing a function in the onComplete parameter, I would like to observe that event for all Ajax.Updater calls. Any idea on how to do that?
Thanks for your help
...
I want to load code and display it inside code tags (for syntax highlighting, etc.) like this:
<pre><code>alert("javascript loaded");</code></pre>
I am doing this in jQuery right now:
$.ajax({
url: "/local/path.js",
success: function(data) {
alert("success");
var code = $("<pre><code>" + data + "</code></pre>");
$("bod...
I am trying to pass a variabel from a .click event to a colorbox plugin like so:
$('.w_price_assess p.price_report > a').live('click', function() {
var $reportRef = $(this).attr('href');
var $reportID = $reportRef.substr($reportRef.lastIndexOf('/') + 1);
return false;
});
I need $reportID to be visible to an AJAX call ...
Not a framework or anything, which AFAICS always carries with it a shipload of extraneous, irrelevant (from my POV) support code. I'm just looking for a couple hundred lines of bulletproof JS that correctly implements multiple simultaneous AJAX requests; error handling; and callbacks into my code.
Thanks!
-- pete
...
What I am after are some tutorials that are ajax specific for implementing SWFAddress in different contexts (in the anchors, in jquery $.change() functions, etc). This way I can learn it myself.
What I am trying to do is save the state of a form in the address bar so that the results can be stored in the browsers history (allowing use o...
I have a view model with a collection of other objects in it.
public ParentViewModel
{
public int Id { get; set; }
public string Name { get; set; }
public List<ChildViewModel> Child { get; set; }
}
public ChildViewModel
{
public int Id { get; set; }
public string FirstName { get; set; }
}
In one of my views I pas...
I have a button on my ASP.NET page, which fetches some data from my database and displays it on a gridview.
This process takes a while, so I thought I'll add an updateprogress AJAX control. Now when I click the button, the updateprogress image shows up and data is being fetched from my database successfully (I checked this from some lo...
Hi all,
I'm trying to use simpletip to generate dynamic tooltips from a database. I am working from this example, which works fine. It's using an image name (the image you hover over) as the key to pass to the PHP for querying the database.
$('.exampleselector').simpletip({
content:'<img src=".." alt="loading" style="margin:10px;" ...