View Full Version : Can anyone figure out what's wrong with this code?

11-12-2004, 04:20 PM

I'm trying to use a js function to send an alert method when the user clicks on the command button on a form. For some reason I can't get the code to work (no alert method is triggered). Can anyone see anything obvious? :

function setTextArea(form){

<b>This section of the form uses a text area.</b><p>
<form name="myform">
<textarea name="myarea" cols="40" rows="5">
Write your comments here.
<input type="button" name="button3" value="Test TextArea" onClick="See TextArea(this.form)"><br>

netwarriorgizmo :confused:

11-12-2004, 05:18 PM
It appears u're never even calling the function.

Your onClick should say:


Oh btw this shouldn't have been posted here, you should have posted it within here (http://www.codingforums.com/forumdisplay.php?f=2), which is the main JavaScript Programming forum.

I think that should solve ur prob.