Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Simple Syntax Question

Status
Not open for further replies.

DutchMaster

Programmer
Apr 29, 2005
12
US
Excuse my ignorance, but I am just beginning to dabble in JavaScript.

I have a webpage found at
It is basically a shopping cart page. The only thing is there is an error (maybe two) in the syntax I am using. If anyone can help me it would be greatly appreciated, and I will give you credit in the finished system credits.

There seems to be one error when the page loads, and one more when UPDATE is clicked. In addition, when Check Out is cliked, it doesnt seem to execute the checkFrom function properly (I am assuming it is becuase of the errors listed above).

Thank You.
 
[tt]Error: missing ) after argument list
Source File: Line: 63, Column: 38
Source Code:
elseif (document.myForm.QuanTTU-6.value != "8")[/tt]

my suggestion - get rid of that hyphon. make it an underscore instead.

*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
This did not work, cLFlaVA

perhaps it's because you didn't put the proper code in place?

[tt]Error: unterminated string literal
Source File: Line: 14, Column: 34
Source Code:
elseif (document.myForm.QuanS1'].value != "63")[/tt]

You need an opening square bracket AND an opening quotation mark.

*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
My Mistake.. the code doesnt have those, I accidentally posted a test html output instead of the most current. the HTML above was taken after I removed the [' and '] chars.. and I just forgot a set. It has since been updated to not have those, and still yields an error.
 
Is "elseif" proper syntax in javascript? I always thought it should be 2 words.

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top