Avatar of newbie27
newbie27Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

ajax not responding in IE

Hello Experts,
I am doing an Ajax call on the page to save the data in the XML file. It woks just fine in FF but for some reason it is not posting data to the proxy.asp page in IE.
Please can someone advice me why?
Many thanks for your help.
Regards
S
JavaScript

Avatar of undefined
Last Comment
LordOfPorts
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Please follow the URL below, once you are there click on any icon in the grid for the notes field  to enter text to be saved/updated.
It is getting posted fine in FF but not in IE.
Please advice
Thanks

1:

      

http://213.253.134.6/artism/admin/list_admin.asp#istest
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

The notes seem to post fine through IE and Firefox in my test, the list was updated and saved successfully (please see first 2 records). Which version of IE are you using? Any custom security settings perhaps?
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

hello LordOfPorts:
thanks for picking this up for me....i am using IE7 and it is not posting to the proxy.asp page at all...
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

So far I do not any issues with the code, you do have 2 DOCTYPEs at the top of the page as displayed in the code snippet below and should remove one of them however that is most likely not causing the problem.

Is the pop-up for entering the notes displayed in IE 7 when you click on the icon and simply does not post the comment or does the pop-up not get displayed at all? Try disabling the pop-up blocker in IE 7 and ensure that the security settings in the Internet Options are set to their defaults.

Another step I would recommend is to validate the page at http://validator.w3.org/ and resolve the issues it reported after you removed one of the DOCTYPEs at the top of the page.

Even though it works fine in Firefox try using the Firebug extension https://addons.mozilla.org/en-US/firefox/addon/1843 to trace the steps; as you are more familiar with the application you might spot something, e.g. below is a screenshot of its output, the call to list_proxy.asp shows the XML and confirms that it is valid.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Open in new window

FirebugOuput.png
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

LordOfPorts:
thanks for your comment
removing the other doctype did not help, it works just ok in FF, have looked in firebug for the xml and other possible issues which i thought might be responsible ... that did not helped me either.
ASKER CERTIFIED SOLUTION
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Hello LordOfPorts.

Many Thanks for your help, changing the Mime Type has worked.

Regards
Sam
If InStr(Request.ServerVariables("HTTP_ACCEPT"), "application/xhtml+xml") > 0 Then
    Response.ContentType = "application/xhtml+xml"
Else
    Response.ContentType = "text/html"
End If

Open in new window

Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Thanks
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I am having another issue on the same app but on the different page , I wonder If you could please check this as well...

https://www.experts-exchange.com/questions/23579627/adding-items-to-the-list.html

thanks for your time and help.

cheers
sam
Avatar of newbie27
newbie27
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

LordOfPorts,
Just to let you know, changing the Mime Type as above has made it to break on FF ):-
http://213.253.134.6/artism/admin/list_admin.asp#istest
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Firefox is very strict, for this issue, try surrounding the script with // <![CDATA[ tags as demonstrated in the code snippet below:
<script type="text/javascript">
  // <![CDATA[ 
 
   // Javascript code goes here
 
  // ]]>
</script>

Open in new window

JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo