Portal Home > Knowledgebase > Articles Database > Problem with Javascript works mainly in IE only


Problem with Javascript works mainly in IE only




Posted by SWDevil, 08-21-2009, 10:24 PM
I am haivng a little problem with this js and was wondering if anyone had any idea on how to fix it. Here is the issue: Visit: http://www.test.trpn.com/1/cgi/page.cgi?g=;d=1 (the guy at the footer with numbers) Now unless you are using IE, you will notice that when you try to click on searchbox and type anything it won't work. The only way to make any input field work is by first right clicking on it and then it will accept input. Test site works normally without the js at footer. Here is the URL with full JS: http://www.test.trpn.com/ratenow/rate.js I have 'no clue' what is wrong, however if someone can tell me how to fix this, it would be much appreciated. Thanks.

Posted by Xeentech, 08-22-2009, 08:16 AM
The script is basically designed only to work in IE, and it's only working in IE because of bugs only IE has. There's even a snipet of code that tests if you're using IE5 and is supposed to eject an error when you're not, only this isn't even working. The certain problem you're talking about is caused by (other than only writing for IE5.0) a function that is bound to the mouse events of document that returns false.. blocking all focus() and blur() events. I have now idea why you'd even want that behaviour.

Posted by SWDevil, 08-22-2009, 10:29 AM
Hi Xeentech, Yeah its one of the script that was written for me few years back, and today when I was working on project where it could use the function, thought it would be nice to have it. I will see if I can get it upgraded or changed, else it would not be practical to use anyway. Thanks again for the input.

Posted by Qandil, 08-28-2009, 03:26 AM
Try replacing the javascript with across browser js Library like JQuery

Posted by siv9, 09-02-2009, 11:56 AM
I agree, jQuery is invaluable. JavaScript can vary so much from browser to browser, is almost impossible to write completely cross-browser compatible javascript without using something like jQuery.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Helm V4 (Views: 488)
Which Reseller (Views: 474)
suhosin and .htaccess (Views: 468)