Tag: ajax

jQuery .load seems to be running at an unexpected point

So I’m trying to load some returned html from an .aspx page but a click event needs to fire before it doing some stuff that the AJAX request depends upon. More specifically, I’m doing this. When a user types in a text field this function is run… function KeyPress() { $(“#” + HiddenButtonId).click(); $(“#test”).load(“TempJumpToAJAX.aspx”); } […]

Zend_Form Jquery & fileUploadErrorIniSize

Edit, I fixed it by changing my JS to: $(‘.zend_form input:not([type=”file”]), .zend_form textarea’).each(function() { data[$(this).attr(‘name’)] = $(this).val(); }); Hello, As I posted earlier, I followed a ZendCast that allowed you to use jQuery to detect and display to users problem with their form. However, file fields always return: fileUploadErrorIniSize (File ‘image_front_url’ exceeds the defined ini […]

Javascript: how to post the whole page?

Is it possible to post the whole html page to the server(assuming that the server can handle it)? I’m trying to implement the following setup. The user makes some changes(the user selects some text, and this text is wrapped in <span> tags with some class) to html and submits the page. The server extracts some […]

Why would PHP-generated Javascript not work in file loaded via AJAX?

I am loading a .php file via an ExtJS AJAX call like this: menuItemApplication.header.on(‘click’, function() { Ext.Ajax.request({ url: ‘content/view_application.php’, success: function(objServerResponse) { var responseText = objServerResponse.responseText; regionContent.update(responseText); var scripts, scriptsFinder=/<script[^>]*>([\s\S]+)<\/script>/gi; while(scripts=scriptsFinder.exec(responseText)) { eval(scripts[1]); } } }); }); Javascript in the loaded .php file executes fine: <script type=”text/javascript”> regionContent.update(‘changed region content from within application view’); </script> […]

Browser crashes after 10-15 mins

In my app I’m displaying 10 charts (charts are from dygraphs.) to monitor data. For displaying charts I’m getting data from my sever by sending ajax request to 4 servlets on every 5 seconds. After 10-15 mins (don’t know exact time.) my browser crashes saying “aw!! snap.” What could be the reason? Is it javascript […]

Ajax inserted content not accesible in DOM

I am working on a pure jquery/js site, mostly to practice some jquery. I am using a load statement to load a menu from a file of common html, like so: $(‘#categoryListing’).load(‘../common.html #categoryLinksUL’); which loads: <ul id=”categoryLinksUL”> <li><a href=”#anklets” rel=”ajax”>Anklets</a></li> <li><a href=”#bracelets” rel=”ajax”>Bracelets</a></li> </ul> The problem is where I am using it now I need […]

Having trouble getting jQuery AJAX response headers

This is what I’m trying: $.ajax({ type: ‘GET’, url: ‘http://imgur.com/upload/’, data: { url: ‘http://upload.wikimedia.org/wikipedia/commons/3/3e/Phalaenopsis_JPEG.png’ }, complete: function(jqXHR, textStatus) { console.log(jqXHR.getAllResponseHeaders()); } }); I just get an empty string. Any help would be appreciated. Edit: These are the response headers I can see in Firebug: Server: nginx Date: Sat, 02 Jul 2011 03:04:26 GMT Content-Type: text/html; […]

Override Ajax Success event

I am trying to override the jQuery ajax function to handle a default action on a success event but also executing the callback function that i am using in the options parameter. What the purpose is there is tags returning in the response that I always want to strip out of the response for use […]

php / mysql result in pages

for example i have in database 50 rows, how i can get mysql results in pages, 5 results on each page, and display pages ,like : [1] , 2 , 3 , 4 .. 10 if page 5 => 3 , 4 , [5], 6, 7 .. 10, and do this without refreshing all content […]

Passing value from code-behind to Javascript

I am using a jQueryUI ProgressBar to show users how much allowed file storage they have used. The percentage is calculated in code-behind and should be passed to Javascript. Aspx Code <asp:Content ID=”Content1″ ContentPlaceHolderID=”HeadContent” runat=”server”> <script type=”text/javascript”> $(function () { var pct = document.getElementById(“filesPercentage”).value; $(“#progressbar”).progressbar({ value: pct }); }); </script> </asp:Content> <asp:Content ID=”Content2″ ContentPlaceHolderID=”MainContent” runat=”server”> […]