a question regarding .NET postbacks and javascript

P

pj121

Hi,

Here's my situation:

I have an asp.net webform and it has a linkbutton on it. The
linkbutton causes a postback. So the user selects some values and then
clicks the linkbutton. Now, based on the values the user selected, a
pop up window will get displayed when they click the linkbutton.

So in the event handler for the linkbutton postback I do the following.

//Get the users selected values and show the appropriate popup
private void lnkPopup_Click(object sender, System.EventArgs e)
{
Response.Write("<SCRIPT language='javascript'> " +
"window.open(url,'previewWnd',"
+ "'Height=450;Width=600;toolbar=no;menubar=no;scrollbars=yes;status=no;resizable=yes;');"
+ " </SCRIPT>");
}

So all it does is in the event is figure out the url variable based on
user selections and then show the popup using Response.Write

This works great in IE, but it does not work in Netscape 7 or Mozzilla
- it wwill not show the popup window in these browsers.
Any ideas why?

TIA
 
K

Karl Seguin

Works fine. If you type javascript: into the address box, do you see any
errors?

Where is the javascript variable "url" being set? why is this a client-side
variable as opposed to a server side? My guess is that there's some
confusion here on your part...

Karl
 
P

pj121

I need to make a pop up window when the postback event get finished.
This code works in ie but now in Netscape or Mozzilla

Do you know of another way to make a pop up window after the vent
handler gets processed?

Thanks
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top