My Code looks like (simplified) this:
I want the user to be able to insert a text into "taIn". When he presses "btOne", a function "fnc(tableID, text)" (in file.js)processing the inserted text should be called and should edit content on the page, especially the table following it. How do I modify the attribute "onclick"?Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>title</title> <script type="text/javascript" src="file.js"> </script> </head> <body> <textarea rows="10" cols="30" id="taIn"> </textarea> <input type="button" id="btOne" onclick="" value="Press"> </input> <table id="tabID"> ... </table> </body> </html>
I tried
though this does not seem to work. Any suggestions?Code:onclick={"fnc(tabID, " + taIn.value + ")"}
Thank you in advance!


Reply With Quote
. Thank you!

Bookmarks