Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 javascript question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 07 May 2001 :  13:13:43  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
whats wrong with this? Im trying to do an if statement and dont know javascript


<script Language="JavaScript">
<!--
function saveInformation(){
if (Validator()) then {
document.ContactInfo.action="/exhibitparts/store/checkout/contact_info.asp?action=save";
document.ContactInfo.submit();
}

}
function Validator() {
if (document.ContactInfo.Name.value == "") {
alert("Please enter a value for the \"Contact Name\" field.");
document.ContactInfo.Name.focus();
return (false);
}
return true;
}

//-->
</script>


Brad

Edited by - redbrad0 on 07 May 2001 17:38:59

redbrad0
Advanced Member

USA
3725 Posts

Posted - 07 May 2001 :  17:40:44  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
anyone?

Brad
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 08 May 2001 :  06:50:47  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message


Brad
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 08 May 2001 :  07:09:38  Show Profile  Visit HuwR's Homepage
an indication of the error would be useful since ther does not appear to be anything wrong with what you have written

Go to Top of Page

paco
Junior Member

Spain
187 Posts

Posted - 08 May 2001 :  09:49:49  Show Profile
<script Language="JavaScript"><!--function saveInformation(){ if (Validator()) then {

if (condition) {do something}

There's no if ... then in javascript

Regards,
Paco

Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 08 May 2001 :  10:01:29  Show Profile  Visit Kat's Homepage
Well spotted Paco.

I couldn't see it - so used to ASP!

KatsKorner
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 08 May 2001 :  12:23:31  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
me to, so used to asp, never tried to learn javascript which i know i should. you can do some helpful things with js

Brad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07