D
Don Li
js block
-----------
function addBR(){
document.getElementById('noteid').innerHTML =
document.getElementById('noteid').value + ' <br>';
}
html form block
---------------------
<textarea id="noteid" name="notes" cols="70" rows="4" wrap="SOFT"
style="background-color:#faf9f7">some value here</textarea>
js event trigger
---------------------
<a href="javascript:addBR()"><xmp>add <BR></xmp></a>
Browser behavior
------------------------
FireFox 2, the first time, event trigger works, however, subsequently
it won't work.
IE, simply won't work, complaining about unknown runtime problem.
How to write it correctly?
possible culprint
----------------------
the page has multiple named forms, however, there's only one noteid
field.
Thank you.
-----------
function addBR(){
document.getElementById('noteid').innerHTML =
document.getElementById('noteid').value + ' <br>';
}
html form block
---------------------
<textarea id="noteid" name="notes" cols="70" rows="4" wrap="SOFT"
style="background-color:#faf9f7">some value here</textarea>
js event trigger
---------------------
<a href="javascript:addBR()"><xmp>add <BR></xmp></a>
Browser behavior
------------------------
FireFox 2, the first time, event trigger works, however, subsequently
it won't work.
IE, simply won't work, complaining about unknown runtime problem.
How to write it correctly?
possible culprint
----------------------
the page has multiple named forms, however, there's only one noteid
field.
Thank you.