Visual Studio .NET - 2.0 menu control opening a popup window withouth menubar etc

Asked By shekhar kumar on 02-Dec-08 02:38 AM
I have a menu in 2.0. Whose navigate url is getting set be database value. The value for new window also coming from database.

Now the problem is this I have to open a popwindow on menu click.
If I set navigate url to'url','mywin','width=700,height=600');

The page opens but my parent page get refreshed and it does not show anything on the parent page.

If I am setting'url','mywin','width=700,height=600'); return false;
then there is a java script error.

What I have done is set the navigate url to'url','mywin','width=700,height=600'); parent.close();

it first opens in in new window then a popup opens and then the parent window get closed.
it's working in IE 6 & 7 but not woking in mozila.
Any one plese help me


Thanks but can .... - Asked By shekhar kumar on 02-Dec-08 02:44 AM

Thanks a lot.

But Can i write it to menu control navigate url?

Thanks again.

show Popups different ways page... - C_A P replied to shekhar kumar on 02-Dec-08 02:47 AM

check out code..

<script language="javascript" type="text/javascript" >
function NewWindow(mypage,myname,)


popup when button click


Popup Radio button

By ASP radio button you mean you are using an <input type="radio"..>
If so you can try
<input type="radio" name="rd1"
onClick="'1.htm','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=380,height=480'); return false;" value="0"/>Yes

<input type="radio" name="rd1" value="0" checked />No

popup from Hyperlink

Hyperlink1.Attributes.Add("onclick", "'popup.aspx',null,'height=250, width=250,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');")

Preview the page and your popup will open when the page loads

bodytag.Attributes.Add("onload", "'popup.aspx',null,'height=250, width=250,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');")

try this - C_A P replied to shekhar kumar on 02-Dec-08 02:48 AM

I included a javascript that opens up a pop up window:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!-- #INCLUDE FILE="popupWindow.js" -->

The include file file looks like this:

<script language="javascript" type="text/javascript">

var win=null;

function NewWindow(mypage,myname,w,h,scroll,pos){
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}

// -->

I invoke my pop up window as follows:

<a href="Name of a aspx application.aspx" tabindex=-1 onclick="NewWindow(this.href,'Name of aspx','800','550','yes','center');return false" onfocus="this.blur()"> href display name </a>

Note: the quotes versus double quotes.

In reality I href to a scroll bar load page that then loads my application.
try this link - C_A P replied to shekhar kumar on 02-Dec-08 02:49 AM