473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

A simple IF statement

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>

Jul 21 '06 #1
5 1455
FP wrote:
//If(1 == 2){
"if"
--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
Jul 21 '06 #2

John W. Kennedy wrote:
FP wrote:
//If(1 == 2){

"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 :)

Jul 21 '06 #3
FP
Thanks, I thought I was starting to loose it.

Jul 21 '06 #4

FP wrote:
Thanks, I thought I was starting to loose it.
no worries this happens.

Jul 21 '06 #5
amit said the following on 7/21/2006 2:06 PM:
John W. Kennedy wrote:
>FP wrote:
>> //If(1 == 2){
"if"

<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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 21 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andreas Paasch | last post by:
I'm attempting to trigger things based on time. I have one shop that has opening hours, closing hours and lunch hours store as full hour values, integer, in MySQL. I retrieve them, based on...
27
by: Brian Sabbey | last post by:
Here is a first draft of a PEP for thunks. Please let me know what you think. If there is a positive response, I will create a real PEP. I made a patch that implements thunks as described here....
6
by: SB | last post by:
This while loop keeps repeating even when a correct character is entered.... cout<<endl<<"What day would you like to schedule the appointment?"<<endl; cout<<endl<<"Enter 'M' for Monday, 'T' for...
2
by: Anurag | last post by:
This simple one beats me all ends up(sincerely). I have been doing DB2 UDB for some time now, reading a lot of good discussions in this forum, writing some answers, asking a lot more but this...
3
by: ChrisHadley | last post by:
My simple sortheap configuration question is: the sortheap parameter specifies the amount of memory used by agents for sorts. Is this value the total for all agents or for each? Sort heap...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
14
by: dba_222 | last post by:
Dear experts, Again, sorry to bother you again with such a seemingly dumb question, but I'm having some really mysterious results here. ie. Create procedure the_test As
7
by: Helpful person | last post by:
I am new to Javascript and have a fairly straightforward question. I am trying to use an image as a link to open a new page with the onmouseclick event. In general this seems to work fine with...
1
by: Rahul Babbar | last post by:
Hi, I ran the scripts in a file from Command Line Processor and it gave the error for all the constraints being added, but not the indexes being added. For a simple statement like Alter...
7
by: CSharper | last post by:
Yesterday I had a heated discussion with my colleagues on what is a data centric application and having business logic in sql. I have group of people who wants to include all the business logic in...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.