image must cause a popup/popunder

Ok Boyz (and Galz) here's one for you. I need to have an image cause a popup/popunder an a client machine.

Example:

abs.com is displaying an image on a page as so <img source="www.somesite.com/aPicture.php">

aPicture.php is generating an image as so (example)

<?php
Header("Content-type: image/png");
$im = imagecreate(100,200);
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "www.shockads.com", $text_color);
imagepng($im);
imagedestroy($im);
?>

What I need to do, is have a popup/popunder open up when the user views the abc.com page (only by making changes to the aPicture.php page)

Ideas ? Since the headers are changing to image/png is it even possible ?
LVL 3
odditysoftwareAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hernst42Commented:
No there is no way to generate a popup/popunder with an image. This can only be achieved by generating JS in the img-tag with onMouseOver onMouseOut -Events
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
iceboxmanCommented:
This is called DHTML (Dynamic HTML) and makes use of Javascript, CSS, and Layers.
0
Diablo84Commented:
This is most certainly not possible, besides the reasons of logic this would be something of a security issue. If a site, for example, allowed users to post images it would be a serious issue if users were able to trigger pop ups via these images on a site that is otherwise not in their control. The only way you can achieve this is by editing the html page hosted on the sites server using the methods mentioned by iceboxman above, there is no way to do what you want i'm afraid.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

iceboxmanCommented:
If you do find a page that has one of these images on it, perhaps you can try viewing page source and copy the Javascript that way.  You may be hindered from this IF they put in in a separate .js file AND they put a copy protect on it through Apache.
0
winglis4Commented:
Here's a link to a free JS pop-up calander. I like this one because it uses CSS to let you cusomize the appearance.
http://www.softricks.com/products/calendar/index.html

Hope this helps,
winglis4
0
rockstar_dubCommented:
How about this...
You need to request the image to a new page

in your request file...

//request.html
<? $text = 'www.shockads.com' ?>
<img src="image.php?text=<? echo $text ?>">


in your image file...

//image.php
<?php
Header("Content-type: image/png");
$im = imagecreate(100,200);
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, $_GET[text], $text_color);
imagepng($im);
imagedestroy($im);
?>
0
Diablo84Commented:
My recommendation:

SPLIT hernst42 {http:#12501863} && iceboxman {http:#12506082} && Diablo84 {http:#12513375}
0
iceboxmanCommented:
I agree.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.