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

Open a new window

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I am using the following line of code to create an image which acts as a link - it passes a value to the next page.

<%
response.write &quot;<a href='blank.asp?id=&quot; & id & &quot;' target='_new'><img src='images/viewdetails_over.gif' width='137' height='20' hspace='0' vspace='0' border='0' align='right'></a>
%>

The target='_new' bit opens a new window alright, but I want to be able to specify the window width, height, no location bar etc. When I use a standard bit of javascript to do this it doesn't pass the value through.

How can I alter the code to open the link in a new, customizable window?

Many thanks

James
 
I don't know if you need both the onclick and the href, but this is what we have used in the past.

<a target=&quot;new-window&quot;
onClick=&quot;open('viewAssignment.asp?hid=<%=HC(&quot;h_id&quot;)%>',
'Dialog','width=300,height=300,resizable=yes,
scrollbars=yes');return false;&quot;
href=&quot;viewAssignment.asp?hid=<%=HC(&quot;h_id&quot;)%>&quot;>

<%=varCount%>

</a> [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top