Error: Expected ';'

Posted on 2009-12-17
Last Modified: 2012-05-08
I have a web page that has a javascript error. When the page loads, there is a yellow triangle at the bottom left of the page. The error message says that I have a ; missing on line 364, char 14. When I go to line 364, I do not see where I need to add a ;. Please see attached txt file for source code of the web page.
Question by:utlonghornjulie
    LVL 7

    Expert Comment

    The onClick event is calling Upload_Click. I don't see that anywhere unless it's in a called source file. Your code looks malformed too.
    LVL 4

    Expert Comment

    This doesn't look like valid JavaScript to me...

    Upload_Click if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate('');
    LVL 14

    Expert Comment

    On line 364, change

    <input onclick="Upload_Click(); if


    <input onclick="Upload_Click if
    LVL 14

    Expert Comment

    whoops...reverse those two snippets
    LVL 5

    Expert Comment

    Try adding:


    <input onclick="Upload_Click if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(''); " language="javascript" name="ctl00$ContentPlaceHolder1$btnUploadConsID" type="Submit" id="ctl00_ContentPlaceHolder1_btnUploadConsID" value="Upload" style="width: 120px" /></td>

    Open in new window

    LVL 14

    Accepted Solution

    That won't fix it.

    onclick="Upload_Click if (typeof....

    is unusable JavaScript code

    onclick="Upload_Click(); if (typeof...

    is correct.  That removes the line 364 error.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
    In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now