SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: Expected ";"
-
Aug 9, 2001, 03:30 #1
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Expected ";"
im about to lose my mind, why wont this work??
[code]
function editPrice() {
newPrice = <%=price%> * document.conForm.quant.value;
document.conForm.tPrice.value = '£' + newPrice;
If (newPrice == 0) {
document.conForm.quant.value == 1;
editPrice()
}
}
[code]
its says "Line 106, char21, expected ';'"
line 106 is
Code:If (newPrice == 0) {
-
Aug 9, 2001, 03:39 #2
- Join Date
- Apr 2001
- Location
- UK
- Posts
- 46
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
could be that you don't have a ; after you call editPrice() a few lines later. Depending on what your doing line number don't always match up.
maybe not...
Andy.
-
Aug 9, 2001, 03:50 #3
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
nope, i tried that, same error
-
Aug 9, 2001, 05:43 #4
-
Aug 9, 2001, 05:59 #5
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
there already is
-
Aug 9, 2001, 06:26 #6
-
Aug 9, 2001, 06:30 #7
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
that is the script
-
Aug 9, 2001, 06:37 #8
- Join Date
- Jan 2001
- Location
- Milton Keynes, UK
- Posts
- 1,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Shouldn't that If have a lower case 'i'?
-
Aug 9, 2001, 06:37 #9
- Join Date
- Oct 2000
- Location
- Austin, TX
- Posts
- 1,438
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
document.conForm.quant.value == 1; should be =
ck :: bringing chris to the masses.
-
Aug 9, 2001, 09:04 #10
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
shane got it. im so used to writing asp right now, in a style i like, i sometiems carry it over to javascript
thanks
-
Aug 9, 2001, 10:04 #11
Bookmarks