|
|
|
|
![]() ![]() |
Apr 12 2006, 06:23 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 370 Joined: 22-April 05 Member No.: 6,024 |
Hi, I have this menu on my site which is build in a table. when pointing over a cel with mouse, the background of the cell changes in white and produce a special code:
CODE <td align="center" bgcolor="#D6C2B4" class="bodystyle" style="font: 9px Verdana" onClick="location.href='about.htm'" onMouseOver="this.style.background ='#FFFFFF'" onMouseOut="this.style.background='#D6C2B4'">ABOUT</td> The normal linkcode <a href="...'> is replaced by , onClick="location.href='...'" I want to open this link in a iframe. so i thought using target would do like this: CODE onClick="location.href='about.htm'" target=iframe1 etc... but that doesnt work in combination with the code above. however the page does load in iframe and with target=iframe1 etc, with a normal link like this: CODE <a href="about.htm" target="iframe1">Tea Tree.</a> so the page which is linked to is typed correct in the code, and the target name is correct to. So what code should I use to open my menu item(cel) in an iframe?? |
|
|
|
Apr 12 2006, 07:48 PM
Post
#2
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,153 Joined: 28-May 05 From: Devon, England Member No.: 7,593 ![]() |
When you use the code location.href, you are just using short hand for self.location.href. It's quite simple to get it to load in a frame, just use some code like this:
CODE parent.FRAMENAME.location.href="about.htm" If that doesn't work then replace parent with top and see if that helps. |
|
|
|
Apr 13 2006, 08:13 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 370 Joined: 22-April 05 Member No.: 6,024 |
It worked well with the parent code rvalkass, thank you so much
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 10th October 2008 - 08:07 PM |