A simple IF statement

F

FP

I think I've been staring at the computer screen too long.
Below is the exact code of my HTML page. If I uncomment the "If"
statement in the def function then I don't see the "abc" alert. Am I
writing the "If" statement incorrectly?


<SCRIPT LANGUAGE="JavaScript">
function def(){
//If(1 == 2){
//return false;
//}
}

function abc(){
alert('abc');
return false;
}
</script>
<HTML>
<BODY>
<FORM ACTION="list.php" METHOD=POST onsubmit="return abc();">
<table>
<TR>
<TD>
<INPUT TYPE=submit NAME="Submit" VALUE="Continue">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
 
A

amit

John said:
"if"


--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"

Hi,

Javascript is case-sensitive so that won't work use "if".

JAVAScritp != javascript but javascript == javascript :)
 
R

Randy Webb

amit said the following on 7/21/2006 2:06 PM:
<snipped signature>

Don't quote signatures.
Hi,

Javascript is case-sensitive so that won't work use "if".

What exactly do you think the point of John's post was?
JAVAScritp != javascript but javascript == javascript :)

Javascript is spelling sensitive as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,569
Members
47,204
Latest member
abhinav72673

Latest Threads

Top