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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open browser window & passing values

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
How would you open a new browser window and pass values through the url at the same time??

Scott
 
use a query string.


Tek-tips uses this as well just look at your address bar when your in a web site. I find the query string to be a very useful technique.

HTH That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
yeah I understand that, but that doesn't open a new browser window. here is my code

Dim sb As New StringBuilder()
sb.Append("newgoals.aspx?daname=")
sb.Append(Server.UrlEncode(theid))
sb.Append("&dayear=")
sb.Append(Server.UrlEncode(dayear))

Response.Redirect(sb.ToString)

Somewhere I need to have something like "Target="_blank" but I don't know how you would add this. any ideas?
 
put

javascript:window.open(

your url and your values, then

)

However, you'll have to set this as the onClick event of something on your page, or on some client side event to make it work.

D
 
I ran into this problem a while back. I don't remember ever finding a solution though.

I did however, find a workaround. Build up your string and write some javascript to the page using the statment
window.open(blahblah) where blahblah is your URL with query string. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top