Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Need help in doing iframe

views
     
puaka_astro
post Feb 27 2010, 09:16 PM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


hmm.. try this

1. your image iframe named 'image_frame - <iframe name"image_frame"......
2. content iframe named - content_frame
3. link is in submenu iframe
CODE

[B]this is inside submenu[/B]
<a href="http://forum.lowyat.net/topic/1339427" onclick="changeContent('image_frame', 'http://www.google.com.my/logos/olympics10-sskating-hp.png');" target="content_frame">Link 1</a>

<script>
function changeContent(targetFrame, content) {
     top.frames[targetFrame].location.href = content;
}
</script>

puaka_astro
post Feb 27 2010, 11:43 PM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


lol.. perhaps screenshots would help us(or maybe just me cause i dont get it smile.gif) understand better


Added on February 27, 2010, 11:54 pmsomething like this ?
CODE

onClick="return dw_loadExternal(this.href, 'your frame id here')"


This post has been edited by puaka_astro: Feb 27 2010, 11:54 PM
puaka_astro
post Feb 28 2010, 12:57 AM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


so the drop load will load description inside that iframe ? can;t use my previous post eh ? you said you know how to load content into iframe, so just do so.. but the link you put in href must only show the desc text, e.g
in php
CODE

<a href="content.php?action=get_description&amp;id=1234" target="content_frame">



Added on February 28, 2010, 12:58 amor you can use ajax to load the text, your call

This post has been edited by puaka_astro: Feb 28 2010, 12:58 AM
puaka_astro
post Feb 28 2010, 01:58 AM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


QUOTE
<a href="equipment.html" onClick="return dw_loadExternal('hidden2.html')">Tent</a>
if you want to target iframe, add 1 more param to that function

CODE

onClick="return dw_loadExternal('hidden2.html', 'YOUR IFRAME ID')".....



Added on February 28, 2010, 2:00 amone more thing.. its never silly to ask a question.. smile.gif

This post has been edited by puaka_astro: Feb 28 2010, 02:00 AM
puaka_astro
post Feb 28 2010, 05:48 PM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


i have absolutely no idea why its not working on your machine. here is my working code. note that for js functions were copied from your prev post

CODE

<div class="container">
<div class="span-24">
 <ul id="MenuBar1" class="MenuBarHorizontal">
  <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
   <ul>
    <li><a href="http://forum.lowyat.net/topic/1339427" onclick="return dw_loadExternal('hidden2.html', 'content_frame');">Link 1</a></li>
   </ul>
  </li>
 </ul>
</div>
<div class="span-24">
 <iframe name="image_frame" src="image.html" class="span-24"></iframe>
</div>
<div class="span-8">
 <a href="hidden2.html" onClick="return dw_loadExternal(this.href, 'content_frame')">Testing</a>
 <div id=content></div>
 <iframe id="buffer" name="buffer" src="hidden1.html" onload="dw_displayExternal()"></iframe>
</div>
<div class="span-16 last">
 <iframe name="content_frame" id="content_frame" src="content.html" class="span-16"></iframe>
</div>
</div>

puaka_astro
post Feb 28 2010, 10:16 PM

Casual
***
Junior Member
331 posts

Joined: Jun 2007
From: Isketambola


QUOTE
I'm using the similar code too. It also works perfectly on my machine, but...hmm...what shall I say? Haha.
Huh? i thought you're on localhost ?

for the exact description of the error, hopefully someone will write something here as i don't know much about theory stuffs, most probably related to file path..

 

Change to:
| Lo-Fi Version
0.0183sec    0.36    7 queries    GZIP Disabled
Time is now: 28th November 2025 - 01:09 PM