Hi All,
I have been teaching myself some web design usung Dreamweaver MX and I am having trouble understanding how to get a simple form handled when user hits submit button. For now, I wish to handle the form client side using Javascript, and I don't know where my error is. Here is the way I tried
I created a from called myForm and added a simple text filed Fname ( for first name)
I wrote a javascript function proc_myForm, that for now would simply echo the text field into an alert box.
In dreamweaver, I set the action to proc_myForm() in the form properties window, set up the method as Post and in my javascript section I worte
function proc_myform(myform)
{
alert(myform.Fname.value)
}
hoping I would get whatever I typed in the Fname field in an alert box.
Needless to say, it did not work and I am not sure if it is a dreamweaver issue I do not understand, or do I have a fundemental mis-understadning of how to get and process form data in Javascript
Any help wpuld be greatly appreciated!
Joe Finkelstine
[email protected]
I have been teaching myself some web design usung Dreamweaver MX and I am having trouble understanding how to get a simple form handled when user hits submit button. For now, I wish to handle the form client side using Javascript, and I don't know where my error is. Here is the way I tried
I created a from called myForm and added a simple text filed Fname ( for first name)
I wrote a javascript function proc_myForm, that for now would simply echo the text field into an alert box.
In dreamweaver, I set the action to proc_myForm() in the form properties window, set up the method as Post and in my javascript section I worte
function proc_myform(myform)
{
alert(myform.Fname.value)
}
hoping I would get whatever I typed in the Fname field in an alert box.
Needless to say, it did not work and I am not sure if it is a dreamweaver issue I do not understand, or do I have a fundemental mis-understadning of how to get and process form data in Javascript
Any help wpuld be greatly appreciated!
Joe Finkelstine
[email protected]
Comment