p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript (http://p2p.wrox.com/forumdisplay.php?f=85)
-   -   Use Map/image maps (http://p2p.wrox.com/showthread.php?t=38245)

teresagoh February 9th, 2006 05:16 AM

Use Map/image maps
Hi all, have some problem here, hope somebody can help.
I want to reload two frames at once (i have 5 frames in total) by using <area> tag. But in each <area> tag only allow one href. so how am I going to put two href at once?

Thanks in advance

vinod_yadav1919 February 9th, 2006 05:54 AM

Hii teresagoh!!
Can you explain in detail two frames in one <area> tag and your purspose of doing so??

since if you want ,on click of particular area to load two frames then -->
just make an html file with two frames that solve your purpose.

<area shape ="rect" coords ="0,0,82,126" href ="openframe.htm"
target ="_blank" />

now in ur "openframe.htm" will contain
<frameset rows="*,*">
<frame name="frame1" src="frame1.html" height="100" width="100%" />
<frame name="frame2" src="frame2.html" height="100" width="100%" />

hope this will help you

Cheers :)


vinod_yadav1919 February 9th, 2006 06:11 AM

Hii teresagoh!!

Or alternatively use function to open two windows/pages/whtever u want

function OpenTwo()
//here you can put ur code

<img src ="planets.gif" width="145" height="126" usemap ="#planetmap" />

<map id ="planetmap" name="planetmap">
  <area shape ="circle" coords ="124,58,8" href ="javascript:OpenTwo()"/>

Hope this will help you

Cheers :)


teresagoh February 10th, 2006 05:27 AM

Hi, vinod, Thanks for ur reply. Is helpful, but it doesnt work in my code..

Is like that, I actually have 4 frames in a page. Leftframe, rightTopFrame, rightMidFrame and rightBottomFrame. the leftframe will display the raster map as well as the rightMidFrame. But the raster map display on these two frames are different. the rest of the frame will just display data. there is a label bar next to the raster map in the rightMidFrame. When clicking on the label bar, it will reload the both leftframe and rightMidFrame accordingly. I am using the <area>tag or Coordination for the label bar.

At the moment what i did is that, when clicking at the label bar, i refresh the whole page. That means i href it to a new page where i rewrite all the frame again. Actually this should be working, but the problem is that, after I reload the whole page, error that should not be happen showing like error '80020009'. Before i reload the page, this error doesn't exit. the worst still is the the raster map that actually show before load to the wrong location.

That is why I am thinking of is there any other way to do this and yet this project is quite urgent, i only have 2 days left to do it. may be is there any way to allow to change the 2 frames at the same time without disturbing other frame by using the <area> tag?


vinod_yadav1919 February 11th, 2006 03:54 AM

Hii teresagoh !!

Again , since you want to reload only the particular frames not the whole page??
so <script>
function OpenTwo()
//or window.parent.Leftframe.src="myfile.html";
//here you can put ur code
Offcourse it will work,and i m 100% sure,solution to this question is possible
Hope this will help you.

Cheers :)


All times are GMT -4. The time now is 09:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.