Form does not work in Firefox 2, but works in IE
December 13, 2007 at 4:44 pm | In 05 + Tackling Things | Leave a CommentThere was a time when website development for multi-version of browser can be quite a headache. As for the issue highlighted here, there seem to be mulitiple reasons to cause it. According to various forums I have been through for solution (yes, I had the same problem before), the most likely reason to cause this would have been Javascript. Some even claimed to be their CSS coding! Which I do believe to be highly unlikely.
Anyway, in case you happens to develop an HTML page with forms and with the following javascript, be careful:
|
<script language="Javascript"> <!– Begin function disableselect(e){ return false } function reEnable(){ return true } document.onselectstart=new Function ("return false") if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } // End –> </script> |
In details, what the code does is, whenever there is a mousedown event to occur on a document for browsers that support sidebar property, the mouse event will be cancelled. Most of the time, the usage of the coding snippet is to disable users’ basic interface feature like selecting, right-clicking, etc.. However, that, in return, also causes the users to be unabled to fill in the input in forms (generally, the input looks as if locked).
Similar cases can happen to Seamonkey 1.x, NetScape 7.x and 8.x, and any other browsers that supports sidebar.
The fastest solution will be to remove the coding. In my case, only removing the particular coding works fine.
|
if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } |
In future, if such errors may occurs again, however, 1 simple suggestion to solve such issue:
0. Stop panicking and do not look at the coding as whole problem cause!
1. Track the codings that you think are the likeliest cause
2. Start disabling the lines of code or the functions (depending on the flow of your coding) 1 by 1 (cut, or comment them)
3. Save and refresh your site
4. If the error still occurs, enable the codings again and disable the next
5. Eventually, you will come to an output where disabling that particular code/line solve your problem.
That is how I solve mine most of the time.
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.