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?