RegisterClientScriptBlock Error

Discussion in 'ASP .Net' started by MW, Apr 29, 2004.

  1. MW

    MW Guest

    I am trying to register the follow script through the
    RegisterClientScriptBlock method. When the page loads it tells me that the
    line contain <script language=javascript> is expect ;. Why would it be
    expecting " ;" ? How do I correct this problem?

    <script language=javascript>
    var dynimages = New Array();
    dynimages[0]=['Images/thumbstormfnsh.jpg', 'http://www.cnn.com'];
    dynimages[1]=['Images/thumbstormie.jpg', 'http://www.yahoo.com'];
    dynimages[2]=['Images/thumbuoBuddies.jpg', 'http://www.google.com'];
    </script>

    Michael
     
    MW, Apr 29, 2004
    #1
    1. Advertising

  2. MW

    David Jessee Guest

    change your opening block to....

    <script language="javascript">

    that should fix it


    "MW" <> wrote in message
    news:...
    > I am trying to register the follow script through the
    > RegisterClientScriptBlock method. When the page loads it tells me that

    the
    > line contain <script language=javascript> is expect ;. Why would it be
    > expecting " ;" ? How do I correct this problem?
    >
    > <script language=javascript>
    > var dynimages = New Array();
    > dynimages[0]=['Images/thumbstormfnsh.jpg', 'http://www.cnn.com'];
    > dynimages[1]=['Images/thumbstormie.jpg', 'http://www.yahoo.com'];
    > dynimages[2]=['Images/thumbuoBuddies.jpg', 'http://www.google.com'];
    > </script>
    >
    > Michael
    >
    >
     
    David Jessee, Apr 29, 2004
    #2
    1. Advertising

  3. MW

    avnrao Guest

    i tried out your sample with a small change.
    var dynimages = new Array() // changed New to new.
    it works.

    Av.

    "MW" <> wrote in message
    news:...
    >I am trying to register the follow script through the
    > RegisterClientScriptBlock method. When the page loads it tells me that
    > the
    > line contain <script language=javascript> is expect ;. Why would it be
    > expecting " ;" ? How do I correct this problem?
    >
    > <script language=javascript>
    > var dynimages = New Array();
    > dynimages[0]=['Images/thumbstormfnsh.jpg', 'http://www.cnn.com'];
    > dynimages[1]=['Images/thumbstormie.jpg', 'http://www.yahoo.com'];
    > dynimages[2]=['Images/thumbuoBuddies.jpg', 'http://www.google.com'];
    > </script>
    >
    > Michael
    >
    >
     
    avnrao, Apr 29, 2004
    #3
  4. MW

    MW Guest

    Thank you,

    I didn't even realize that I had "new" capitalized.

    Michael

    "avnrao" <> wrote in message
    news:...
    > i tried out your sample with a small change.
    > var dynimages = new Array() // changed New to new.
    > it works.
    >
    > Av.
    >
    > "MW" <> wrote in message
    > news:...
    > >I am trying to register the follow script through the
    > > RegisterClientScriptBlock method. When the page loads it tells me that
    > > the
    > > line contain <script language=javascript> is expect ;. Why would it be
    > > expecting " ;" ? How do I correct this problem?
    > >
    > > <script language=javascript>
    > > var dynimages = New Array();
    > > dynimages[0]=['Images/thumbstormfnsh.jpg', 'http://www.cnn.com'];
    > > dynimages[1]=['Images/thumbstormie.jpg', 'http://www.yahoo.com'];
    > > dynimages[2]=['Images/thumbuoBuddies.jpg', 'http://www.google.com'];
    > > </script>
    > >
    > > Michael
    > >
    > >

    >
    >
     
    MW, Apr 29, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian W
    Replies:
    1
    Views:
    2,937
    Yan-Hong Huang[MSFT]
    Jul 4, 2003
  2. Wes Weems
    Replies:
    1
    Views:
    421
    Ken Cox [Microsoft MVP]
    Jul 19, 2003
  3. John Livermore
    Replies:
    1
    Views:
    543
    Teemu Keiski
    Jul 25, 2003
  4. Steven K

    Error using RegisterClientScriptBlock

    Steven K, Apr 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    383
    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Apr 14, 2004
  5. registerclientscriptblock error

    , Apr 27, 2005, in forum: ASP .Net Building Controls
    Replies:
    5
    Views:
    138
Loading...

Share This Page