This seems to be working except for one thing. An extra popup window
is being displayed with the following text on it: [object]. This is
the url that is displayed in this extra popup window that I'm trying
to get rid of: javascript:window.open('viewrec.aspx?recordnum=50685','','width=640;height=480;%20scrollbars=1;%20resizable=1');
Here is the code I have written for the HyperLinkColumn in my
DataGrid. Can someone tell me what I'm doing wrong?
Thanks in advance!
<asp:HyperLinkColumn DataNavigateUrlField="recordnum"
DataNavigateUrlFormatString="javascript:window.open('viewrec.aspx?recordnum={0}','','width=640;height=480;
scrollbars=1; resizable=1');" Target="_blank"
DataTextField="proj_name" HeaderText="Project Name">
<HeaderStyle Font-Bold="True" VerticalAlign="Top"></HeaderStyle>
</asp:HyperLinkColumn>
Datagrid Girl
http://www.datagridgirl.com
"crjunk" <crj...@earthlink.net> wrote in message
news:e45e90aa.03022...@posting.google.com...
BTW I just wanted to give you some praise. The instructor I had for an
ASP.NET class highly recommended your web site.
"Datagrid Girl [MVP]" <datagr...@operamail.com> wrote in message news:<eniT#WS3CH...@TK2MSFTNGP10.phx.gbl>...
Here is an answer that I found in an old message:
"means for the browser to evaluate expression and replace the current
page with its value, unless the value happens to be void. The value
returned by window.open() is an Object, whose string representation
is what you're seeing.
To get the side-effect of this feature which you want, without getting
its intended behavior, which you don't want, make sure the expression
evaluates to void:"
Here is what I had to do to correct this problem that I was
experiencing.
<asp:HyperLinkColumn DataNavigateUrlField="recordnum"
DataNavigateUrlFormatString="javascript:void
window.open('viewrec.aspx?recordnum={0}',null,'width=640;height=480;scrollbars=1;
resizable=1');" DataTextField="proj_name" HeaderText="Project Name">
<HeaderStyle Font-Bold="True" VerticalAlign="Top"></HeaderStyle>
</asp:HyperLinkColumn>
After I added VOID to JAVASCRIPT:, everything started working.
"Datagrid Girl [MVP]" <datagr...@operamail.com> wrote in message news:<eniT#WS3CH...@TK2MSFTNGP10.phx.gbl>...
Take care,
Datagrid Girl
http://www.datagridgirl.com
"crjunk" <crj...@earthlink.net> wrote in message
news:e45e90aa.03022...@posting.google.com...
"Datagrid Girl [MVP]" <datagr...@operamail.com> wrote in message news:<#BlGzWc3...@TK2MSFTNGP09.phx.gbl>...