Script Errors from LinkButton

J

John Kotuby

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
 
B

bruce barker

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)
 
J

John Kotuby

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.....
 
J

John Kotuby

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top