javascript:window.open() in a DataGrid HyperlinkColumn

  • Thread starter Thread starter rpeters
  • Start date Start date
R

rpeters

Guest
please reference:
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=219

I have a hyperlinkcolumn in a datagrid which fires off a javascript from the DataNavigateUrlFormatString that looks like:

"javascript:window.open(Report.aspx?Report=Sample);"

The new window opens fine. The problem is that the browser window where the javascript is called loads in a page with "[Object]" as the only thing on it. I do not want the calling page to go anywhere. This is a javascript issue.

any help is appreciated ...

rpeters
 
Hi rpeters,

I had exactly the same problem with this, and I eventually got it sorted, the only problem is, I am at home now and my solution is at work.

Taking a lucky dip in my memory, try setting a variable equal to the window.open method.

javascript:varRpt=window.open(Report.aspx?Report=Sample);

If this doesnt work let me know as I know Ive solved this before.

Gazzo.
 
Back
Top