PDA

View Full Version : What to do...



Jam-ez
06-07-2009, 08:54 PM
Hi,

I have a layout, which features this code (as a base).


<div id="main_header"></div>
<div id="main_title">title</div>
<div id="main_middle">
content
</div>
<div id="main_bottom"></div>

But, I'm stuck for ideas - how would I made it so when the navigation is clicked the information changes? Would I need to make separate pages with the code repeated and iframe them in?

Any ideas are appreciated, thanks.
James.

BoyBetterKnow
07-07-2009, 10:52 AM
use jQuery ajax ?

Lucas0123
13-07-2009, 07:20 AM
James I will Help you, ill speak to you laters.

Fehm
13-07-2009, 11:44 AM
You could add an iFrame in the middle bit, use Dynamic Drive or google.

Your links would then be
<a href="LINK" target="iframe_name">Contact Us whatever</a>

And the page that is in the href="" would open into the target iframe :P;P:)
Hope I helped! Ill have a look around for some codes :D

Jam-ez
13-07-2009, 01:20 PM
:D
You could add an iFrame in the middle bit, use Dynamic Drive or google.

Your links would then be
<a href="LINK" target="iframe_name">Contact Us whatever</a>

And the page that is in the href="" would open into the target iframe :P;P:)
Hope I helped! Ill have a look around for some codes :D

Done it with Javascript. On onclick called a function.. don't have the exact code but it simply changed the display of the inactive divs to

display: none;... wasn't too hard! :D

Fehm
13-07-2009, 01:23 PM
=]! :) Glad you sorted it! :P

Blinger1
14-07-2009, 07:05 AM
For others reference:

I am guessing you used a code a little like this?


function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
and it is called like this

<div id="foo">Wow, this is rly rly cool m8</div>
<a href="#" onclick="toggle_visibility('foo');">click![/html]

Want to hide these adverts? Register an account for free!