Jump to content


dynamically creating a image that links to 2 other URLs

  • Please log in to reply
1 reply to this topic

#1 hanhao

  • Members
  • PipPip
  • Member
  • 10 posts

Posted 04 June 2006 - 09:36 AM

hi, i need to dymaically create a thumbnail button that when the user clicks on it, it does 2 things

1. links to another page called (page1.php)
2. popup another page in new browser called (page2.php) but set this popup in the background

but the problem is <a href only allows 1 page to be linked
how do i do the above?

please help

#2 davidja

  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 04 June 2006 - 11:24 AM

this is more of a javascript question i would think. i'm looking in to it now.

this doesn't use any PHP so you will have to work your php into it. i just want to get you the basic idea of how this could be done.

here you go


function popup( link , pop )
  window.open( pop ,null,
    document.location = link;


<img src="someimage" onclick="popup('http://www.phpfreaks.com','http://www.google.com')">

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users