By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Simple script won't work - why?

P: n/a
Simple script won't work. Why?

function sendIt(module) {

var flagged = document.form1.getElementById("e_flagger").value;
if (module == 'test') {
alert("Test OK:" + " " + flagged);
}

<form name="form1" method="post" onSubmit="sendIt('test');"
<input type="text" size="1" name ="flager" value="Flag">
<input type=submit value="Test It">
</form>

HF
Dec 30 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
he***@earthlink.net wrote:
Simple script won't work. Why?

function sendIt(module) {

var flagged = document.form1.getElementById("e_flagger").value;
if (module == 'test') {
alert("Test OK:" + " " + flagged);
}

<form name="form1" method="post" onSubmit="sendIt('test');"
<input type="text" size="1" name ="flager" value="Flag">
<input type=submit value="Test It">
</form>

HF


First, you have no element with ID "e_flagger".

Secondly, I believe that document.form1.getElementById is invalid (the
correct form being document.getElementById)

What are you trying to do?

Andrew Poulos
Dec 30 '05 #2

P: n/a
On 2005-12-30, <he***@earthlink.net> <he***@earthlink.net> wrote:
Simple script won't work. Why?


Id different from Name.

read the FAQ.
Bye.
Jasen
Dec 30 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.