Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RegisterClientScriptBlock Error

Reply
Thread Tools

RegisterClientScriptBlock Error

 
 
MW
Guest
Posts: n/a
 
      04-29-2004
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


 
Reply With Quote
 
 
 
 
David Jessee
Guest
Posts: n/a
 
      04-29-2004
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
>
>



 
Reply With Quote
 
 
 
 
avnrao
Guest
Posts: n/a
 
      04-29-2004
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
>
>



 
Reply With Quote
 
MW
Guest
Posts: n/a
 
      04-29-2004
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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
registerclientscriptblock error wardy1975@yahoo.com ASP .Net Building Controls 5 04-28-2005 04:10 PM
Error using RegisterClientScriptBlock Steven K ASP .Net 2 04-14-2004 05:41 PM
control equivalent to Page.RegisterClientScriptBlock? John Livermore ASP .Net 1 07-25-2003 01:44 PM
RegisterClientScriptBlock to register OUTSIDE form tags Wes Weems ASP .Net 1 07-19-2003 07:04 PM
Re: RegisterClientScriptBlock & RegisterStartupScript revisited Brian W ASP .Net 1 07-04-2003 01:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57