Jump to content

Using Map Code & Defined New Window Size


CAMPPAIN
 Share

Recommended Posts

This is what an image map code is

 

"<IMG SRC="http://www.camppain.com/pictures/campblackbg900.jpg" USEMAP="#campblackbg900.jpg" WIDTH=900 HEIGHT=675 BORDER=0>

<MAP NAME="campblackbg900.jpg">

<AREA SHAPE=RECT COORDS="260,12,351,41" HREF="http://www.camppain.com/interview.html" TARGET="_blank" ALT="interview" OnMouseOver="window.status='read the interview'; return true">

<AREA SHAPE=RECT COORDS="363,12,450,39" HREF="http://www.camppain.com/pictures.html" TARGET="_blank" ALT="pictures" OnMouseOver="window.status='See my pictures'; return true" OnMouseOut="window.status='Eye candy'; return true">

<AREA SHAPE=RECT COORDS="483,13,536,41" HREF="http://www.camppain.com/bio.html" TARGET="_blank" ALT="Bio" OnMouseOver="window.status='411'; return true">

<AREA SHAPE=RECT COORDS="562,12,650,42" HREF="http://www.camppain.com/miscpics.html" ALT="misc pics" OnMouseOver="window.status='Friends and such'; return true">

<AREA SHAPE=RECT COORDS="682,11,744,43" HREF="http://www.camppain.com/forum" ALT="Forum" OnMouseOver="window.status='My forums'; return true">

<AREA SHAPE=RECT COORDS="765,10,854,45" HREF="http://www.camppain.com/guestbook" ALT="guestbook" OnMouseOver="window.status='I hope your thinking of signing'; return true" OnMouseOut="window.status='You better!'; return true">

</MAP></table>

"

 

Basically it allows you to make a link around a certain word or image. I have the code on my main page if you want to see.

Link to comment
Share on other sites

Alright, I understand what an image map is and what it does. All you said in your first post was "map code" and there are a lot of different kinds of maps, even in web design (site map, geographical map, image map, etc). So, now to your question though,

How would I go about using my map code with a specific new window pop up?

 

I can't read your mind....Are you trying to:

 

1) Create an image map for another image that you want to use on a different page?

 

2) Use the same image and map only have it open in a new window?

 

3) Neither and I'm completely missing it?

 

Lianna

Link to comment
Share on other sites

Well, for future knowledge, the href of each area can point to javascript functions (which is how you normally pop up a new window of a specifc size).

 

So, re-using some of your code, it would look something like this:

 

><script type="text/javascript">
  function popUp( url, width, height ){
     // code to do pop up here
  }
</script>

<IMG SRC="http://www.camppain.com/pictures/campblackbg900.jpg" USEMAP="#campblackbg900.jpg" WIDTH=900 HEIGHT=675 BORDER=0>
<MAP NAME="campblackbg900.jpg">
  <AREA SHAPE=RECT COORDS="260,12,351,41" HREF="javascript:popUp('http://www.camppain.com/interview.html', 800, 600);" ALT="interview" OnMouseOver="window.status='read the interview'; return true">
</MAP>

 

Noticed how I change the HREF to use the added javascript function? (I also removed the TARGET attribute because it's unnecessary and could cause problems).

 

HTH

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...