View Full Version : Opening a new a href in a div layer?


anesthesia
10-09-2006, 01:55 AM
I've always used IFrames in the past but I would like to switch to all DIV layers. Is it possible to open an already existing a href in an already existing div box that are both on the same page??

For example, my graphical mouseover links (seen here (http://www.passionate-eye.org/main2.html)) need to open in the new div frame (or is that not possible?) And if not, and I need to bring back my IFrame, how do I go about placing that on top of all of my div layers? :confused:

Nightgrauen
10-09-2006, 12:42 PM
I work with div-layers for 4 years now, but I am not sure I get what you mean/ask?Normally I do it this way


<html>
<head>
all the stuff that belongs in the head part.
</head>

<body>
<div id="navi">
<ul>
<li><ahref="url"1>url1</a></li>
<li><ahref="url2">url2</a></li>
<li><ahref="url3">url3</a></li>
</ul>
</div>

<div id="content">
If your webspace supports PHP, I would use a PHP code for dynamic Inclusion which automatically adds your content here.
</div>

</body>
<html>


And add all your content to another content-file, for each page a new php-file. If you click on the link <ahref="index.php?site=page1"> The conten will be automatically placed om the contet-div-layer. This would be almost similar to an iframe. You code the entire layout and the content will be added in the div-layer (instead of an iframe).

If it doesn we will have to work around it, but I know how to do that as well. So let me know.

bourdelson
10-09-2006, 02:30 PM
I've always used IFrames in the past but I would like to switch to all DIV layers. Is it possible to open an already existing a href in an already existing div box that are both on the same page??


To answer this question directly: no, pages cannot open up into div layers.

As hinted to in the post above, you can use either PHP or server side includes to make coding easier, depending on what your host supports.

SSI: http://www.lissaexplains.com/html6.shtml#SSI

PHP includes: http://www.lissaexplains.com/html6.shtml#php

J to the izzosh
10-10-2006, 01:57 AM
Javascript, in conjunction with the Document Object Model, can be used to dynamically modify the contents of an element (http://www.google.ca/search?ie=UTF-8&q=javascript%20change%20div%20contents). AJAX (http://www.xml.com/pub/a/2005/02/09/xml-http-request.html), which utilises that form of Javascript, is a technology which facilitates the loading of content from external documents. As previously mentioned, though, there is no simple HTML method for dynamically loading external content into a document, other than frames.

anesthesia
10-10-2006, 03:06 AM
Hmm.. Well, until I can learn more on the things you all have mentioned what can I do to make my IFrame appear on top of my named/numbered DIV layers? I think I've temporarily gotten in over my head and need a quick fix until I have time to sit for a bit and look over all of the links you all have supplied (thank you! btw). Is there a small fragment that I can add to my coding to fix that? :teddy:

pb&j
10-10-2006, 01:37 PM
easiest fix is to keep using iframes. nothing wrong with them.

anesthesia
10-10-2006, 02:19 PM
Right.. I understand that would be the easiest thing to do.. but how do I bring my IFrame back to being in the foreground? It's currently being covered over by the layout and other DIV layers... :confusion

bourdelson
10-10-2006, 04:37 PM
Try adding style="z-index:1;" to your iframe tag.

If that doesn't work, could you post your coding? You've hijacked your source so nothing shows up when I go to View > Source, so it's impossible to see if there's anything wrong with it. Thanks. :)

anesthesia
10-10-2006, 04:58 PM
OH GOSH.. *lol* I forgot to mention the whole "missing coding" thing.. It's there you just have to scroll all the way down. *lol* I had some 12 year olds copying my coding frag for frag one time so I threw that in there. I thought it might just be enough to confuse them.. and it worked! *lol* I'm going to try that bit of coding now.. BRB. :buckt:

IT WORKED! *happy dance* Thank you! Thank you! Thank you! I've never seen that bit of coding before. Crazy. I really appreciate everyone's help. :waves:

bourdelson
10-10-2006, 06:39 PM
You're welcome. :) Glad you got it to work.