This is a migrated thread and some comments may be shown as answers.

Odd disruption of JavaScript calls from RadGrid

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 29 Sep 2014, 02:32 PM
Frankly I'm asking this one only because I'm curious.  

I have a fairly conventional RadGrid set up with edit links on each row.  Each link calls a JavaScript function which in turn causes an editing screen popup.  

The link elements look like this:  
<a id="ctl00_MainContent_RadGrid1_ctl00_ctl04_EditLink" href="#" onclick="return EditForm('14001','0');">Edit</a>

I also have a span at the top of the page that displays "Welcome" logged in person.  Somehow someone messed up the users table and the name field included characters within double quotes.  As such, for example, the field would be rendered like this:
  <span id="lblFullName" style="color:Blue;">Welcome Joe "***" Smith</span>

When this happened, the JavaScript function started crashing. The function got the correct parameters but this line started crashing.
 var oWnd = window.radopen("EditForm.aspx?Id=" + Id, "Edit Item " + Id); 

When I put a catch in there, the error was Cannot read property 'open' of undefined.

Naturally the practical solution to this problem was to purge the database of bad data but I'd still like to know what happened.

 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 02 Oct 2014, 10:52 AM
Hi Boris,

I am afraid I am not sure when the JavaScript throws an error. How the double quotes in the span element are connected with the script which opens the EditForm? I would appreciate if you could provide a small runnable sample in order to investigate the cause for this issue further.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Boris
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or