Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting new page properties

Status
Not open for further replies.

HotBob

Programmer
May 26, 2006
37
GB
Hi there, I have a button and when I click on it I want to be directed to another page, but I want this page to open in a new window and be of a certain height and width, any ideas?

I need something like this

Response.Redirect("PC.aspx?ID=" & ddlPC2.SelectedValue & "&w=300&h=300")

but I need a new window and height and width - any ideas?
 
You will need to use JavaScript to do this.. look into window.open()
 
You'll either have to use javascript (window.open) or the anchor tag's target attribute (target="_blank"). If you go with the first option, make sure not to use Response.Write (use RegisterClientScriptBlock instead).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
This dowsn't work

Response.Write("<Script Language=JScript> 'window.open('PC.aspx?ID=' + document.getElementById('ddlPC1').value,'mywindow','width=360,height=180');</Script>")

any ideas? Can i pass in a query string
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top