Button Link

  • Thread starter Thread starter Cracker Jacks
  • Start date Start date
C

Cracker Jacks

How can a button link to a external website and
open a new window for that sit with the same
button? Would appreciate any ref. scripts. Thanks
in advance.
 
Ok I'm having trouble here. Want a form button to
open a new window with a hyperlink to a local doc
or another web site in it. Here is what I got in
the code.

<form method="GET" target="_blank"
action="onclick">
<p><a target="_blank"
href="submission_form.asp">
<input type="button" value="Apply Here"
name="B3"></a></p>
</form>
 
Maybe this will help?

<form method="POST" action="foo.htm" target="_new">
<p><input type="text" name="T1" size="20"><input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>

on foo.htm would be the code to display the hyperlink, not the form itself.

Or, are you trying to pass the URL (maybe typed into a form field by a
user??)

If so, you need some asp code on foo.htm and change it to foo.asp.

Something like (pseudocode)
<%
dim hlink
hlink = request.form(T1)
response.write(<a href=""" + hlink + """>link</a>)
%>
 
I'm sorry I got this all goofed up. This code
works great on the same page frame, but I want it
to open a new frame window.

<input type="button"
value="Microsoft"onclick="window.location.href='ht
tp://www.microsoft.com'">


John Clark said:
Maybe this will help?

<form method="POST" action="foo.htm" target="_new">
<p><input type="text" name="T1" size="20"><input type="submit"
value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"> said:
</form>

on foo.htm would be the code to display the
hyperlink, not the form itself.
 
OH!!!

That's easy :-)

<input type="button" value="Microsoft"
onclick="javascript:window.open('http://www.microsoft.com','new');">

(in the above, "new" is the name of the window, so if you click multiple
buttons, they can all have the same target "new", or you can give them all
different names, like "foo" "bar" etc...)

Good luck.
-John
 
Back
Top