Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Problem With 'target' In Html
Nani Cheri
post 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??
Go to the top of the page
 
+Quote Post
rvalkass
post Apr 12 2006, 07:48 PM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,153
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
Nani Cheri
post 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. where did you learn html from?(89)
  2. Html And Xhtml(11)
  3. Html Cool Codes?(6)
  4. Html Editor(19)
  5. Do You Know Html?(65)
  6. Html And Javascript(12)
  7. Url Redirection = Javascript+html(4)
  8. Html Question Concerning Pre Tag And Code Tag(8)
  9. Creating Link In Html - Help Me With This!(5)
  10. Have You Used This Html Code?(9)
  11. Error In Css (or Html)(5)
  12. Wanting To Touch Up/learn My Html Again(27)
  13. Having Html Troubles......(1)
  14. Html Query(2)
  15. How To Display Php Code [resolved](8)
  1. Help With Html(11)
  2. Ok Background Help Please(4)
  3. Some More Help With Html(2)
  4. Html Help(6)
  5. Help With Css/html Layout(5)
  6. Wanna Learn Html From Scratch(5)
  7. Login In Using Html(12)
  8. Html Application Form(6)
  9. Best Way To Protect Html Form Fields(3)
  10. Html Div Help [resolved](1)
  11. Html Ascii Codes - A Complete List(3)
  12. Help Making A Web Adress Bar Using Html/js(9)
  13. Some Questions On Html(6)


 



- Lo-Fi Version Time is now: 10th October 2008 - 08:07 PM