Let's say you have a little Ajax script and it sends data to the server to do something. Now the server has an issue of some kind (let's say with the query) and can't so what you expect it to do. What's the best way to tell your awaiting Ajax functionality something went wrong?
Is there any such thing as a jQuery Debugger, i'm trying to learn jQuery but even small things like Syntax errors keep getting in the way and it's hard to track down without any error reporting.
I am not quite sure where to place this question since it involves C#, javascript and even a call to SSRS. What I want to do is call a Sql Server Reporting Services Report, using javascript like so:
The code works and I can pull the correct report. The issue is I wanted some visual que for the user that the report was being generated. that is why i used the javascript functions : cursor_wait(), and cursor_clear(). The problem is I want to display a wait cursor until the window with the report returns and displays the report then reset to the default cursor at that time. But the above code resets the cursor right away without waiting for the report to return. I tried adding attributes to the page form and other methods to access onBlur and such but haven't been able to get there yet.
I am trying to develop a dashboard for reporting on a large dataset of customers. When it reports on filtered results it works ok but whenever we filter on something that returns a lot of results (ie. customer without email addresses, or a specific customer type ajax returns blank. I have tested the query and apart from taking a while to return, there is nothing wrong with the query.
[Code]...
This just builds the query dynamically based on the results of the above, ignoring any value that equals "NOFILTER".
I'm having trouble loading jQuery into SQL Server Reporting Services Report Manager. Since SSRS is a proe-compiles ASPX page, and we are not given the source code, we have little ability to make changes to the interface. If I could add jQuery directly, the progblem would be trivial. However, all we have the ability to modify is an existing Javascript file that is loaded at runtime in the head of each page. I have been able to get this to load relatively reliably using IE 8, but other browsers either don't load it at all, or only on the first pass. Here is the structure that I have in place:
It seems like determining element position in a web page is a difficult task. In the position reporting source code I've looked at there are special fixes for at least some versions of Safari and Opera. I am doing a lot of dragdrop experimentation and in some situations need a position reporting function. The function doesn't need to report the positions of exotic elements like images in button elements; however, I would like a position reporting function that can at least handle combinations of scrollable elements and tables....
I am misunderstanding the concept of the xmlHttpRequest.readyState attribute. I would like to be notified when such a page is successfully visited but have a different function invoked when an error (e.g. 404) occurs. How would I do this? Here is the code I have now ...
var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } var strURL = "myURL.html"; self.xmlHttpReq.open('GET', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { alert("Web page visited successfully!"); } } self.xmlHttpReq.send("");
I have my site set up so that everything is done with AJAX requests to a script depending on what action is taken. If my script returns an error - such as the user is not allowed to take the action they tried to take - it returns an error message.
What I would like is for AJAX to know when there is an error returned, and I know there is an error parameter for the ajax function, but as far as I know that is only for HTTP error codes - so how would I modify my PHP script to return an error that the ajax would know it is an error?
With another attempt, here's the initial ASP.NET v1.1 page with the AJAX script in the Head tag, and I get the IE "Unknown error" in the handleServerResponse() when it's assigning "show" it's innnerHTML value: Code:
In the code below the preFilladmin function creates a JavaScript error after leaving the admin_uid field
// Set this to your validation PHP script, default is "validate.php?value=" var vUrl = "/validate_assignIP.php?value="; // This is the array for error handling
This is my first post to the group, so please be gentle :) For some unknown (to me at least) reason I'm getting a syntax error in IE from the following code
This piece of code is used for an AJAX function, it works perfectly well in all other browsers than internet explorer.
// JavaScript Document // store xmlhttp in a variable var xmlHttp; function xmlHttpRequestObject () { // assume we're working with a newer browser try { xmlHttp = new XMLHttpRequest(); } catch(e) {
// assume IE6 or older try { xmlHttp = new activeXObject("Microsoft.XMLHTTP"); } catch(e) { } } .....
I want to have a textarea update a database column and then pull down the info from that column and display it, without refreshing. I'm using JQuery and AJAX and PHP and SQL to do this. So far I've been able to update the database row using my $.post() call. The strange thing is, my variables don't seem to be passing to the page - when I try to echo them or look at them they don't show up. Here is my simple index page and call (page names aren't indicative of what I'm trying to do, just placeholders):
I'm not sure why my ajax is throwing a cross site scripting error. I have a php page that request a page not in my domain. I have another page where my ajax requests the php page, which is in my domain. Then the error is thrown. Since the php page is in my domain, why would the error be thrown?
I have a website that uses AJAX to generate data in an html table. I want to copy/paste the entire page into MS word and have the conents of the page be displayed exactly like how it is in the browser.
When I do, I get script errors in each cell of the table. I believe it is some compatibiliy issue with AJAX and word. If I remove all the ajax functions from the website's code, the copy/paste would work.
Anyone know how to make ajax be compatible with MS word for copy/pasting?
Unfortunately I can not post any links to this website because it is an internal website at my work. I do not have a personal webserver so I can not link any screen shots. I will in the near future if this gets too complicated.
I have PHP file called file1.php with an empty <div></div> in the middle. I've added a 'load' event listener so that on page load, it calls an AJAX function that calls file2.php. file2.php creates a table and loads it into the <div></div> in file1.php.
file2.php has <a> tags in it's <th> columns and I wish to trap when a user clicks on the column heading. The old way was to use the onclick() method but I'd rather use event listeners.
Here's my problem. I am getting "obj has no properties" when trying to add those listeners. I *think* it is because the code in file2.php isn't part of the original DOM tree for file1.php. So how can I use event listeners instead of onlclick()? I know I can add top the DOM by creating elements and appending them but that adds to the HTML code and my code is already in place via the AJAX call. What to do...? DO I just use the old passe onclick() method?
We're using jQuery ajax quite a bit without issue. Today, however, we ran into an issue where the results of a query are not displayed.fyi... the following works fine in firefox. scenario:
1. load ajax "$("#location").load( url... )" used to retrieve results
2. using fiddler, we can see the results are returned as expected
3. results not displayed. look at the updated dom in IE8 with dev tools and the results are not put into the display area Additional info...
a. using $("#location").load( url, function(data) { alert(data); }); the alert shows the results are returned via the function call as well.
b. the #location is an empty div.. e.g. <div id="location"></div>
c. if we put some text in the div, it will be removed, by the call, but the results still will not display
d. we have removed all .show(), .hide() options
e. if we remove the ajax call and just do a $("#location").text("blah blah blah..."); the results are displayed
f. we have tried both 1.3.2 and 1.4.a1 again, every variation works just fine in firefox.t
What I noticed is that my error callback is fired every time. MyService.asmx: [WebMethod] public FileInfo[] GetFileInfo(int Id){ Proxies.ServiceRef.ServiceClient c = new Proxies.ServiceRef.ServiceClient(); return c.GetFileInfo(Id).ToArray(); }
The Jquery code where I am getting error: $.ajax({ url: url, data: jsonData, type: "POST", contentType: _I.contentType, timeout: _I.timeout, dataType: "serviceproxy", // custom type to avoid double parse dataFilter: function (jsonString, type) { .....
When I debug using firebug the response is as follows. {"d":[{"__type":"Proxies.AFARServiceRef.AssignmentInfo","ExtensionData": {},"AssignDate":"/Date(1317748587667) /","AssignFileName":null,"ClaimId":"PA026195","ClaimantName":"Rachel Weiss","FirstContactDate":"/Date(1302678000000)/","FirstContactTime":{"Ticks":433800000000,"Days":0,"Hours":12, "Milliseconds":0,"Minutes":3,"Seconds":0, "TotalDays":0.50208333333333333, "TotalHours":12.049999999999999, "TotalMilliseconds":43380000, "TotalMinutes":723,"TotalSeconds":43380},"Id":5257, "InspectionDate":"/Date(1302246000000)/","StatusId":1,"SubmittedCount":5, "UploadedCount":9}]}
I've noticed that when I click the Stop button on the browser, or navigate to another page, jQuery.ajax calls the error event. You can see the problem live at: [URL]..
It seems that if I use jquery in https and do an ajax call out and then update the dom with the resulting html I get an HTTPS unsecure content warning. Now the content is all https and there are not http calls any where so I'm wondering if this has been seen before. I've dug very deep looking for the issus and if I take jquery out of the equation it doesn't give me an error. But I've standardized jquery as part of the site and don't want to mix straight old javascript with jquery, if I can avoid it.
I'm trying to incorporateRemy's select-chainplug-in into my code, and I'm having troubles. I hopesomeone can take a minute or two to help me. My situationseemed simple, only 2 levels, Products and Programs under each Product. I have the back-end working, so it returns the JSON list of Programswhena Product ID is passed. However, the plug-in keeps failing in the .ajax() function, tripping the error(). It reports a "parsererror", so I know I've messed up something. One wrinkle, I have multiples of the Product/Program pairs on my page, identified as "prod_x"/"prog_x", so I need to dynamically call them. Here is my code:
I have been using asynchronous requests for a long time. so the response was processed in a callback function. I thought of not using async so i made synchronous requests. The reason is that i dont have to have two more lines for checking the status and the onreadystatechange.... my synchronous requests would be like this...
[Code]....
so from the code you can understand that there is no need of a callback function and if conditions to check ready state... ... So there is no problem in the above code. The problem araises here... if i press the F5 (refresh) key or do a page refresh when the process is waiting for the response i get an (NS ERROR - firefox ( i have not yet checked that in IE browsers) (javascript error) though the process completes successfully. why?
Do we have to check whether the page is navigating away while in synchronous operation and abort the request? or what could be the reason for the error. This will not happen in async requests because that is also the reason for async...