HighTechTalks DotNet Forums  

Script Errors from LinkButton

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss Script Errors from LinkButton in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Kotuby
 
Posts: n/a

Default Script Errors from LinkButton - 12-18-2007 , 02:46 PM






Hey guys,

In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have set
the IE option:

"Display Notification of all script errors" to be active.

Now that I have changed some asp:links to asp:linkbuttons, I am getting
notification of script errors whereas before on the same page I wasn't. It
has to be the Javascript DoPost with options that ASP.NET is generating, I
would think.

Has anyone else experienced this?

Of course I have noticed that in the last year I have seen script error
notifications from lots of web sites, even from some major fortune 500
companies (Microsoft itself, for example).

The site seems to perform exactly as expected, but the notifications are
annoying and look unprofessional.

Anybody know a way around this? Must I write my own Javascript routines?

TIA



Reply With Quote
  #2  
Old   
bruce barker
 
Posts: n/a

Default RE: Script Errors from LinkButton - 12-18-2007 , 04:01 PM






you should enable debugging and track down the error. its not normal.

i check my websites with, ie 6 (via vm), ie 7, firefox and safari for any
script, or rendering errors. you should also test with disabled binary
behaviors in IE

note: the first script error causes javascript to stop running.


-- bruce (sqlwork.com)


"John Kotuby" wrote:

Quote:
Hey guys,

In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have set
the IE option:

"Display Notification of all script errors" to be active.

Now that I have changed some asp:links to asp:linkbuttons, I am getting
notification of script errors whereas before on the same page I wasn't. It
has to be the Javascript DoPost with options that ASP.NET is generating, I
would think.

Has anyone else experienced this?

Of course I have noticed that in the last year I have seen script error
notifications from lots of web sites, even from some major fortune 500
companies (Microsoft itself, for example).

The site seems to perform exactly as expected, but the notifications are
annoying and look unprofessional.

Anybody know a way around this? Must I write my own Javascript routines?

TIA




Reply With Quote
  #3  
Old   
John Kotuby
 
Posts: n/a

Default Re: Script Errors from LinkButton - 12-18-2007 , 06:51 PM



Thanks Bruce,

Here is the error I am getting. There are 3 of them, equal in number to the
HyperLinks that I converted to LinkButtons.
The HyperLinks generate no Javascript code. The LinkButtons generate code
that I have no control over.

A runtime error has occurred. Do you wish to debug?
Line 375:
Error: expected ')'

with Yes or No buttons.

If I click Yes the Script debugger brings me to some code that seems totally
unrelated to the error message.
If I click No, the page renders and the LinkButtons work just fine.

I don't understand how I can control code that ASP.NET generates for me?

I will look more closely at where the script debugger brings me...but so far
I see no rhyme nor reason to that location.

Note: The LinkButtons are inside of a repeater control. There are many
instances of all 3 controls on the rendered page. I figure that I am being
prompted for each initial instance of error only once. But maybe I'm wrong.

Hmmm, I see it doesn't say Script Error, just runtime error.

Thanks.....



"bruce barker" <brucebarker (AT) discussions (DOT) microsoft.com> wrote

Quote:
you should enable debugging and track down the error. its not normal.

i check my websites with, ie 6 (via vm), ie 7, firefox and safari for any
script, or rendering errors. you should also test with disabled binary
behaviors in IE

note: the first script error causes javascript to stop running.


-- bruce (sqlwork.com)


"John Kotuby" wrote:

Hey guys,

In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have
set
the IE option:

"Display Notification of all script errors" to be active.

Now that I have changed some asp:links to asp:linkbuttons, I am getting
notification of script errors whereas before on the same page I wasn't.
It
has to be the Javascript DoPost with options that ASP.NET is generating,
I
would think.

Has anyone else experienced this?

Of course I have noticed that in the last year I have seen script error
notifications from lots of web sites, even from some major fortune 500
companies (Microsoft itself, for example).

The site seems to perform exactly as expected, but the notifications are
annoying and look unprofessional.

Anybody know a way around this? Must I write my own Javascript routines?

TIA






Reply With Quote
  #4  
Old   
John Kotuby
 
Posts: n/a

Default Re: Script Errors from LinkButton - 12-19-2007 , 03:54 PM



Bruce,
You were absolutely correct.
The debugger brought me to a <td> tag.
Within the table cell about 8 lines down was an OnClick event attribute.
One of the parameters it was passing was a string that included a
single-quote and it ruined the call to the Script.

Thank you for your help.

"bruce barker" <brucebarker (AT) discussions (DOT) microsoft.com> wrote

Quote:
you should enable debugging and track down the error. its not normal.

i check my websites with, ie 6 (via vm), ie 7, firefox and safari for any
script, or rendering errors. you should also test with disabled binary
behaviors in IE

note: the first script error causes javascript to stop running.


-- bruce (sqlwork.com)


"John Kotuby" wrote:

Hey guys,

In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have
set
the IE option:

"Display Notification of all script errors" to be active.

Now that I have changed some asp:links to asp:linkbuttons, I am getting
notification of script errors whereas before on the same page I wasn't.
It
has to be the Javascript DoPost with options that ASP.NET is generating,
I
would think.

Has anyone else experienced this?

Of course I have noticed that in the last year I have seen script error
notifications from lots of web sites, even from some major fortune 500
companies (Microsoft itself, for example).

The site seems to perform exactly as expected, but the notifications are
annoying and look unprofessional.

Anybody know a way around this? Must I write my own Javascript routines?

TIA






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.