Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
my image map won't click
Old 08-13-2010, 05:44 AM my image map won't click
Webmaster Talker

Posts: 611
Trades: 0
Hi, I have an image map mixed in with php, and it won't click when I click the mouse on it, it won't work. Any help greatly appreciated. Thanks. Derek

here is the code where I use it.

Code:
if(isset($_GET['newLocation']))
{
  $_SESSION['current_location']=$_GET['newLocation'];
}

if(!isset($_SESSION['current_location']) && !isset($_SESSION['current_background']) && !isset($_SESSION['currentMonster']))
{
  $_SESSION['current_location'] = 0;
  $_SESSION['current_monster'] = 0;
   $_SESSION['current_background'] = 0;
}

if($_SESSION['current_location'] != 0) {
  if(!isset($_SESSION['current_background']) && !isset($_SESSION['current_monster']))
  {
     $_SESSION['current_monster'] = 0;
     $_SESSION['current_background'] = 0;
  }

  if(isset($_GET['further']))
  {   //below is- inside the locations array, teardrop ocean (1) the background image is 4(example)+1 is set, then
     //do this
     if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']+1])) {
        $_SESSION['current_background']+=1;
     }
     if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']+1])) {
        $_SESSION['current_monster']+=1;
     }
  }
  elseif(isset($_GET['back']))
  {
     if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']-1])) {
        $_SESSION['current_background']-=1;
     }
     if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']-1])) {
        $_SESSION['current_monster']-=1;
     }
  }

  // I dont have any $_SESSION['background'] var
  //$currentBackground=$_SESSION['background'][$_SESSION['current_background']];
 
  $currentBackground = $locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']];
 
  //I dont have any $_SESSION['monster'] var
  //$currentMonster=$_SESSION['monster'][$_SESSION['current_monster']];
 
  $currentMonster=$locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']];
 
} else {
  //?newLocation=1 means set it to Teardrop ocean.
  $currentBackground = '
     <img src="aradia.jpg" width="256" height="328" border="0" usemap="#Map" />
     <map name="Map" id="Map">
          <area shape="rect" coords="5,176,81,249" href="?newLocation=1"/>
     </map>';
  $currentMonster = '';
}
silverglade is offline
View Public Profile
 
 
Register now for full access!
Old 08-13-2010, 05:58 AM Re: my image map won't click
Super Talker

Posts: 139
Name: John Davis
Trades: 0
try to specify full url. Now you have href="?newLocation=1".
Change it to href="scriptname.php?newLocation=1" or something like that.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
View Public Profile Visit MapMaster's homepage!
 
Old 08-13-2010, 06:20 AM Re: my image map won't click
Webmaster Talker

Posts: 611
Trades: 0
Thanks. It didn't work though. I think my problem might be with the z indexing of my divs but I thought I already messed around with that. Thanks for looking for me though.
silverglade is offline
View Public Profile
 
Old 08-13-2010, 06:24 AM Re: my image map won't click
Webmaster Talker

Posts: 611
Trades: 0
Nevermind I got it to work. It had to do with the z indexing of my overlapping divs. thanks. Derek
silverglade is offline
View Public Profile
 
Closed Thread     « Reply to my image map won't click
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13763 seconds with 12 queries