Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

pop up

hello,
Ok,this the ques: i want to have a banner on a page let's say 123.jpg and I want to have 2 pages pop up when some one clicks on it. the first browser page www.page1.com and the also in a different browser i would like www.page2.com to open also. How would the html look?
0
lonewolf
Asked:
lonewolf
  • 7
  • 7
1 Solution
 
martinagCommented:
<A HREF="javascript:window.open('http://www.page1.com');window.open('http://www.page2.com')"><IMG SRC="123.jpg" BORDER="0"></A>

Martin
0
 
martinagCommented:
I wrote a function which makes your job a little bit easier...
<SCRIPT LANGUAGE="JavaScript">
<!--
function openMultiple() {
  for (i=0;i<openMultiple.arguments.length; i++) {
    window.open(openMultiple.arguments[i]);
  }
}
// -->
</SCRIPT>

Then call it:
<A HREF="javascript:openMultiple('http://www.page1.com', 'http://www.page2.com')"><IMG SRC="123.jpg" BORDER="0"></A>

You may use as many arguments (URL's) as you want to.

Martin
0
 
MasseyMCommented:
Read the above comments... People, post these as answers!

Please reject this and let somone from above send in the answer!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
martinagCommented:
MasseyM, why did you post an answer if all you have to say is that I should post one?

Martin
0
 
lonewolfAuthor Commented:
I beleive Martin should get the points. i have no idea what MasseyM is trying to say or do.
0
 
martinagCommented:
Thank you!

Martin
0
 
lonewolfAuthor Commented:
Also please tell me how to add the code to make it so when you pass the cursor over the link you see the message Page 2 instead of the address.  thanx
0
 
lonewolfAuthor Commented:
<A HREF="javascript:openMultiple('http://www.page1.com',
     'http://www.page2.com')"><IMG SRC="123.jpg" BORDER="0"OnMouseOver="window.status='Page 2';return true;"></A>

Is this how it should look?

0
 
martinagCommented:
Just move your OnMouseOver to the link:
<A HREF="javascript:openMultiple('http://www.page1.com', 'http://www.page2.com')" OnMouseOver="status='Page 2';return true"><IMG SRC="123.jpg" BORDER="0"></A>

Martin
0
 
lonewolfAuthor Commented:
Hello,

Everything works except the mouse over. When passing the cursor over the image I see the mutiple java address' ect.........
????????
0
 
martinagCommented:
Are you using the code in my last comment?

Martin
0
 
lonewolfAuthor Commented:
Yes,this is what I added to my page. It can be found at
http://www.excel.net/~clewis/beauty.htm
thanx


<SCRIPT LANGUAGE="JavaScript">
     <!--
     function openMultiple() {
       for (i=0;i<openMultiple.arguments.length; i++) {
         window.open(openMultiple.arguments[i]);
       }
     }
     // -->
     </SCRIPT>
<CENTER><A HREF="javascript:openMultiple('http://www.xpics.com/ass/ass.html?acb=acb137500-65000','http://www.excel.net/~clewis/beauty2.htm')" OnMouseOver="status='Enter';return
     true"><IMG SRC="enter02.gif" BORDER="0"></A><CENTER>

0
 
martinagCommented:
There's definitely something's strange...If you watch the status bar carefully, you'll notice that it displays "Enter" when the mouse LEAVES the image (NN4.04).

Maybe you could try writing the whole OnMouseOver at one line.

Martin
0
 
lonewolfAuthor Commented:
Example Please :-)
0
 
lonewolfAuthor Commented:
Ok,that was it.
0

Featured Post

Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now