Computing.Net > Forums > Web Development > YUI and AJAX scripts not working in IE

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

YUI and AJAX scripts not working in IE

Reply to Message Icon

Name: anifstudios
Date: October 7, 2009 at 22:53:27 Pacific
OS: Windows Vista
CPU/Ram: 1.2Ghz/2GB
Subcategory: Javascript/Ajax
Comment:

Hi All,

I have almost given up on this, though I don't really want to, I don't have any options, so I really need to resolve this.

I just started learning YUI on my own and I am using it in the front page layout I am working on. I have this done and working, but for some strange reason it is not working in IE. It works in Firefox and it works in Google Chrome. Worse still, there is no way of debugging in IE, so I cannot even nail down what the problem is.

The flow is, when you click the "Enter" Button, it pops up a div which provides a user with option to enter their email. On clicking submit, the YUI scripts should perform a POST and get a return answer. All this works in other browsers, but something is causing to fail in IE. If anyone can help me out and have a look, I will very much appreciate it. I have been on this for 3 days and I can't take it anymore.

To make things easy, I have zipped the components in here http://www.anifstudios.com/XX_RM_We...



Sponsored Link
Ads by Google

Response Number 1
Name: Fist (by fmwap)
Date: October 8, 2009 at 17:40:44 Pacific
Reply:

You've got a trailing comma on the end of your options list:

misc.js line 71:
headers: { 'X-Transaction': 'POST Example'},

Change to:
headers: { 'X-Transaction': 'POST Example'}


IE is picky about such things.


0

Response Number 2
Name: anifstudios
Date: October 8, 2009 at 21:28:42 Pacific
Reply:

OMG..wow, thanks a lot!!! How in the world did you debug that!! I was almost about to take this down, 'cos I ended up finding a JQuery solution which uses like 75% less code. I really like the functionality of YUI from which I read in the docs, but it honestly just seems really bloated at times. JQuery was so much easier to attach a plugin and call. Now I'm stuck, I have 2 solutions to decide from.

From your experience, what do you think, if you have used JQuery also. Thanks a lot though for helping out.


0

Response Number 3
Name: anifstudios
Date: October 8, 2009 at 21:42:03 Pacific
Reply:

I will say this though, the YUI seems way more robust, so maybe I'll just try to be more careful and watch my syntax.


0

Response Number 4
Name: Fist (by fmwap)
Date: October 11, 2009 at 12:48:35 Pacific
Reply:

Hey, sorry about the delay in my reply.

About debugging that - the script error icon in IE (bottom left) is completely useless - except for the LINE number, it (usually) gets that right.

For instance, that script was was throwing the error on index.html:71 - so I just checked your JS files on line 71 & found that in misc.js.

jQuery is my favorite JS framework hands down, I've used mootools, scriptaculous and prototype, but JQ's minimal syntax & the huge amount of plugins available makes it my fav.

I've never used YUI though - I've looked at it, and as you say, it seems bloated & requires lots of differnet files for what seems like basic functionality.

Does YUI offer something more than jQuery does for you??


0

Response Number 5
Name: anifstudios
Date: October 11, 2009 at 19:55:31 Pacific
Reply:

Well, YUI just seems to have more control in an odd to explain kinda way. I'm no expert, so maybe it's just me screwing up. Honestly, after you debugged my error, I ended up going back to the YUI solution. I was trying to modify something with the JQuery HTTP POST script solution which I couldn't get to work. The YUI IO module version which has the HTTP POST method, gave me the flexibility to add my own custom code/functions to the already existing functionality. It is bloated to use and adding all that crap, but the advantage it seems to me is the way you can layer custom stuff. But maybe it's just me. Anyway, it seems the best solution is hybrid. A mix of both YUI and JQuery, wherever they work better. For example, I was using JQuery for the facebox.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: YUI and AJAX scripts not working in IE

index.asp not working in firefox www.computing.net/answers/webdevel/indexasp-not-working-in-firefox/4192.html

script works in IE not Netscape www.computing.net/answers/webdevel/script-works-in-ie-not-netscape/1088.html

Works in IE but not FireFox www.computing.net/answers/webdevel/works-in-ie-but-not-firefox/3797.html