Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<a linking to multiple sections

Status
Not open for further replies.

sambo80

Technical User
Oct 4, 2005
11
GB
Hi

I have a map, with the diffferent areas linking to their own tables. But all the code is in one page called index.php. So I have some php code that uses cases to distinguish between the tables. So if you click on NOrth America then case 1 is processed. see below for index.php?r=1.

What I now want is a link that will show all the tables as well.

So user clicks on 'show all events', and then r=1, 2, 3 and 4 are processed and the tables should all appear in the page.

I can't get it to work. See my code at the bottom, at the moment I have

<a href="index.php?r=1,2">

But this isn't working, only r=1 is shown, I'm sure this is an easy fix, my brain is just not with it today!!!

Thanks for your help. :)

Code:
<img name="mapImg" src="../images/pageImages/products/worldMap.gif" alt="" width="480" height="244" border="0" usemap="#Map">

<map name="Map">
<area href="index.php?r=1" onMouseOver="rollMap(1)" onMouseOut="MM_swapImgRestore()" alt="Europe" shape="poly" coords="223,56,214,66,223,68,228,81,217,83,216,91,220,94,231,86,240,85,246,91,274,93,282,76,273,48,279,44,264,37,246,44,238,55">

<area href="index.php?r=2" onMouseOver="rollMap(2)" onMouseOut="MM_swapImgRestore()" alt="Americas" shape="poly" coords="175,57,180,46,203,40,214,22,173,20,144,22,118,22,70,28,66,40,12,40,15,67,48,58,68,94,130,174,123,210,137,241,164,203,190,157,153,117,128,98,134,85,162,76">

<area href="index.php?r=4" onMouseOver="rollMap(3)" onMouseOut="MM_swapImgRestore()" alt="Asia & Australasia" shape="poly" coords="282,46,297,40,288,21,314,21,327,35,356,29,345,22,361,22,379,33,399,35,412,29,438,39,471,45,444,54,401,98,385,102,384,114,393,142,428,152,427,163,464,209,435,224,374,204,346,112,333,138,320,109,304,93,283,82,275,51">

<area href="index.php?r=3" onMouseOver="rollMap(4)" onMouseOut="MM_swapImgRestore()" alt="Middle East & Africa" shape="poly" coords="204,111,221,96,238,90,266,97,284,84,314,108,295,126,295,185,254,201,236,150,213,139">

</map>
</center>

<p class="copySubHead">

<!-- ****  SEE CODE BELOW   **************** -->

<a href="index.php?r=1,2">See all events<img src="../images/redArrowOnWhite.gif" alt="" width="15" height="10" border="0" align="absmiddle"></a>
 
Why do you need to do 1,2 in the first place? Could you not just use an arbitrary number that is not used (0 for example) and on the page parse 0 as all combined? That would be the simplest way to do it.
 
ok...

can i then just have another 'case'. for eg:

<?php
break;

case 0:

// HAVE PHP CODE here to say that case 1, 2 and 3 and 4 should be processed, therefore all the tables would appear one after the other.

I don't want to have the table code repeated in this case.

?>
 
can you have a situation where if its case 0, then process case 1, 2, 3 and 4?

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top