The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Why does this not work - very stuck, if else
Shona
post Nov 18 2008, 06:15 PM
Post #1





Group: Members
Posts: 2
Joined: 14-November 08
Member No.: 7,098



Esentially it checks if the first numerical input or the second input is a number, if not alert if a good number then output it

---

if (((isNaN(first) || (isNaN(second)))
{
Alert("invalid Number entered")
}
else
{
answer=eval(txtanswer);
document.form1.textarea2.value=txtanswer+ "=" +answer;
}
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Nov 18 2008, 10:35 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE
if (((isNaN(first) || (isNaN(second)))


The brackets don't seem to match!

if (((isNaN(first) || (isNaN(second)))
if (((isNaN() || (isNaN()))
if (((isNaN || (isNaN))
if (((isNaN || ())
if ((()
if ((
!

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 11:00 PM