PopUp giving blank page?

J

jm

<asp:HyperLinkColumn runat="server" HeaderText="To"
DataNavigateUrlField="calTo"
DataNavigateUrlFormatString="JavaScript:varwin=window.open('/MoreInfo.aspx?ID={0}',null,'width=400,height=400,location=no');"
DataTextField="calTo" DataTextFormatString="{0}" />

gives the popup desired, but it also gives a blank page; taking the
target out(like above) navigates to a blank window; taking out the
varwin above gives a blank page with [object].

All the variations give the page desired, it just gives an extra page.

Any ideas?

I added a function:

function testlink(temp)
{

window.open("MoreInfo.aspx?ID=" + temp) //+
",null,'width=400,height=400,location=no");
}


But had to comment the last half off because it kept putting the
width, etc., in the address line; The first part works, it just
doesn't allow me to size the windows.

Thanks again.
 
G

Giorgio Parmeggiani

Hi
DataNavigateUrlFormatString="JavaScript:varwin=window.open('/MoreInfo.aspx?I
D={0}',null,'width=400,height=400,location=no');"

... cut...
gives the popup desired, but it also gives a blank page; taking the
target out(like above) navigates to a blank window; taking out the
varwin above gives a blank page with [object].

Try this:

DataNavigateUrlFormatString="JavaScript:varwin=if(window.open('/MoreInfo.asp
x?ID={0}',null,'width=400,height=400,location=no'));"

Ciao
Giorgio
 
J

jm

Giorgio Parmeggiani said:
Hi
DataNavigateUrlFormatString="JavaScript:varwin=window.open('/MoreInfo.aspx?I
D={0}',null,'width=400,height=400,location=no');"

.. cut...
gives the popup desired, but it also gives a blank page; taking the
target out(like above) navigates to a blank window; taking out the
varwin above gives a blank page with [object].

Try this:

DataNavigateUrlFormatString="JavaScript:varwin=if(window.open('/MoreInfo.asp
x?ID={0}',null,'width=400,height=400,location=no'));"

Ciao
Giorgio

Thanks for the help, but it gave a syntax error.
 
G

Giorgio Parmeggiani

Hi

Excuse me I have post you a wrong code, but what is "varwin"?:

This one should work
DataNavigateUrlFormatString="JavaScript: if(window.open('/MoreInfo.asp
x?ID={0}',null,'width=400,height=400,location=no'));"

Ciao
Giorgio
 
J

jm

Giorgio Parmeggiani said:
Hi


Excuse me I have post you a wrong code, but what is "varwin"?:

This one should work
DataNavigateUrlFormatString="JavaScript: if(window.open('/MoreInfo.asp
x?ID={0}',null,'width=400,height=400,location=no'));"

Ciao
Giorgio

That did it! Thank you. Why is the "if" necessary?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top