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

Does anyone know the code for popups on a button?

Status
Not open for further replies.

loopsta

MIS
Nov 16, 2001
47
US
I'm looking for the code to enable a popup to apear when the user presses a link button for a designated page and I would like to have a popup appear when the user enters that page. I hope Ive explained myself OK. Thanks for any help.
 
For question one: ...code to enable a popup to apear when the user presses a link button for a designated page... use this (THIS PART GOES IN THE <HEAD> SECTION OF THE HTML)
<script>
function openwindow(file,name,prefs) {
var wind = window.open(file,name,prefs);
}
</script>
and this part goes where the button (or link) is: <a href=&quot;javascript:eek:penwindow('','window1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=500,height=350')&quot;>View</a>
Now that code works like this:
is the link...
window1 will increase the number time you call the function...
width and height define the width and heightof the new window...

Question two: ...and I would like to have a popup appear when the user enters that page... use the same tech. as before...

Any Q's just ask... I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top