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

How can I use a button control to show a JavaScript window?

Status
Not open for further replies.

BlueBlade

Technical User
Joined
Mar 2, 2007
Messages
15
Location
US
Is it possible to call a javascript new window using a Button control like you would use a Hyperlink control? I have a list of buttons on my form and I would like for the control that opens the window to be a button as well rather than a HyperLink control. Please let me know how this can be done if possible.

Thanks for you help on this one,

Blade
 
This is windows or web app ?
How do you show the javascript window with the hyperlink ?
 
It's a web app. and I solved the problem. Here's how I did it. This goes in the Head tag of HTML:

<script language="javascript" type="text/javascript">

function newWindow(bookgif)
{

window.open(bookgif,"name","width=600,height=600");}</script>

Then for the button it looks like this:

<input type="button" value="Notes On Current Question" name="Popup" onClick="javascript:newWindow('

This worked except that I had to put my button on the form instead of a table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top