SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: Expected ";"

  1. #1
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    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) {
    thanks

  2. #2
    SitePoint Enthusiast
    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.

  3. #3
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nope, i tried that, same error

  4. #4
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try inserting semi-colon after where you call the function. Just a suggestion, no clue if it will work.

    Someone's gotta know the answer to this.

    Hope you find your answer.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there already is

  6. #6
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops, oops, edit.

    I misread the few posts before. Basically said the same thing I said. doh, sorry.

    How about pasting more of the script? It could be somewhere else.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  7. #7
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that is the script

  8. #8
    SitePoint Wizard
    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'?

  9. #9
    You talkin to me? Anarchos's Avatar
    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.

  10. #10
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    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

  11. #11
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dhtmlgod,

    that's a good thing. Up with ASP!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •