Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<FORM ACTION=action.php NAME=REPLIER METHOD=POST enctype=\"multipart/form-data\"> <INPUT TYPE=BUTTON CLASS=SUBMIT NAME=preview VALUE='Preview Post' onclick='previewMode();'> <object name='previewbox' data='previewpost.php' type='text/html' style='height:300px; width:100%'></object> </form> <SCRIPT type='text/javascript'> <!-- function previewMode() { document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.lid.value = document.forms.REPLIER.layout.value document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.text.value = document.forms.REPLIER.message.value document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.submit() return true } //--> </script> |
Quoted
Originally posted by mmxbass
I am becoming increasingly frustrated with Konqueror's hypersensitive behavior with regards to Javascript. Consider the following snippet of code which works in Firefox, Mozilla, IE and Opera and NOT in Konqueror.
Observe a snipping of the relevant parts. The contents of replier are not relevant. The error is in the fact that document.forms.REPLIER.previewbox seems to be not found.
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <FORM ACTION=action.php NAME=REPLIER METHOD=POST enctype=\"multipart/form-data\"> <INPUT TYPE=BUTTON CLASS=SUBMIT NAME=preview VALUE='Preview Post' onclick='previewMode();'> <object name='previewbox' data='previewpost.php' type='text/html' style='height:300px; width:100%'></object> </form> <SCRIPT type='text/javascript'> <!-- function previewMode() { document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.lid.value = document.forms.REPLIER.layout.value document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.text.value = document.forms.REPLIER.message.value document.forms.REPLIER.previewbox.contentDocument.forms.PREVIEW.submit() return true } //--> </script>
Now. To be honest, I am loathe to blame a browser for code not running, it almost never happens that it's the browser's fault. HOWEVER, when something executes fine in Firefox, IE, and Opera, I begin to question if it might be a browser issue. What is going on?
Forum Software: Burning Board®, developed by WoltLab® GmbH
Linux Computer - Linux Forum -
Linux Computer und Notebooks - Lastminute - Wasserbetten & Whirlpools