Jump to content

How to make a pop up window within my script


sdpullen

Recommended Posts

Hey everyone. Is there a way to make an <a href> tag within my script for each of the dj's? I want it to where when the dj's picture is showing, you can click on their pic and it would pop up a small window and have all of their information.

Here is my script:

[code]
<?php
$Sigs=array('http://www.sikestonfirstmedia.org/jocks/wknd.jpg','http://www.sikestonfirstmedia.org/jocks/bobsherismall.jpg','http://www.sikestonfirstmedia.org/jocks/cjsmall.jpg','http://www.sikestonfirstmedia.org/jocks/joesmall.jpg','http://www.sikestonfirstmedia.org/jocks/lukesmall.jpg','http://www.sikestonfirstmedia.org/jocks/ronniesmall.jpg');
$times = array(2,7,12,17,22);
$time = date('H');
$day = date('D');
$w_days = array('Sun','Sat');
if (in_array($day,$w_days)) $i=0;
else {
$i = 0;
while ($time >= $times[$i]) $i++;
}
echo '<img src="',$Sigs[$i],'" >';
?>
[/code]

These are the links to the dj pictures:

'http://www.sikestonfirstmedia.org/jocks/wknd.jpg','http://www.sikestonfirstmedia.org/jocks/bobsherismall.jpg','http://www.sikestonfirstmedia.org/jocks/cjsmall.jpg','http://www.sikestonfirstmedia.org/jocks/joesmall.jpg','http://www.sikestonfirstmedia.org/jocks/lukesmall.jpg','http://www.sikestonfirstmedia.org/jocks/ronniesmall.jpg'

Thanks for your help!

Link to comment
Share on other sites

Well, you can also use that same window.open function in your links directly.

<a href="#" onclick="window.open( 'http://www.google.com/', 'myWindow',
'status = 1, height = 300, width = 300, resizable = 0' );">

That should work.

Here is another good read on the subject:
http://www.sitepoint.com/article/perfect-pop-up
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.