Click to See Complete Forum and Search --> : opening URL into a layer


dr_bozak
04-22-2003, 01:05 PM
I am trying to open a URL into a layer instead of a frame or antoehr window.

I was trying to use the load() (method??)
here is what I got so far ....

<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="lightgreen">
<tr>
<td width="594"> <p>Please choose your favorite broker for this order. This
is a requirement. <br>
If you are unsure, please
<a href="../contact.cfm"
onClick="Layer1.load(www.fancyfronds.com,600);">contact
us</a></p>
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 211px; top: 169px;" >

This is the layer I am trying to load into.
</div>

</td>
</tr>
<tr>
<td height="54"> <table width="600" border="1" cellspacing="0" cellpadding="0">
<tr class="formlabel">
<td>Company</td>
<td>Broker Name</td>
<td>Contact Info</td>
</tr>
</table></td>
</tr>
</table>

khalidali63
04-22-2003, 01:07 PM
No you can not do that.to open a page it has to be frame or window, a lyer(most likely a div tag) can not open a url in it.

Jona
04-22-2003, 01:07 PM
I doubt this could be done with Javascript (although it may be possible). Try using SSIs instead. (Or use Javascript to write a variable and then document.write(/*SSI tag*/ + variable + /*the rest of the tag*/);

dr_bozak
04-22-2003, 01:16 PM
that is really weird. using dreamweaverMX o-reilly javascript refernce, they claim that there is a load method which lets you open a url into a layer they say the syntax is :

load("URL",layerwidth)

attatched is the screenshot from dreamweaver

Jona
04-22-2003, 01:21 PM
Well, your question does make sense then, if I were using NN4, I would know what you're talking about....

khalidali63
04-22-2003, 01:30 PM
I am not sure where exactly orielly or macromedia are getting that info from.As I mentioned in my post above your Layer1 is a div tag and here is the link that points to the div tags allowed event calls
http://www.w3.org/TR/html4/struct/global.html#h-7.5.4

:D

dr_bozak
04-22-2003, 01:30 PM
oh .. so that is only supported in NN4?

i misunderstood what the reference meant I guess.
I thought when it said NN4 .. I thought it meant it was supported from NN4 on ...

thanks for the help.
who writes good reference materials where I can see which methods I can use?


thank you very much.

Jona
04-22-2003, 01:34 PM
Just remember that if it's for NN4, it's only for NN4. If it's for NN4+ it's for NN4 and up.

havik
04-22-2003, 01:34 PM
I'm not too sure about this but give these a try.

put your url in quotations, as that is how O'Reilly states it should be done.
fool around with absolute and relative positioning.

Actually, that screenshot did state layers and ilayers, and those are NS4 layers. div layers are for modern browsers and my not support this load function.

Havik

dr_bozak
04-22-2003, 01:40 PM
thanks to all who responded.

--- absence of evidence isn't necessarily evidence of absence

:cool:

dr_bozak
04-22-2003, 05:27 PM
I got it to work with Cold fusion (it could probably be done with asp or php as well)

<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; top: 0px; left: 10px;">

<cfinclude template="rotated.cfm">

</div>

just thought I'd post that to give others an idea of how to do it, albeit not with javascript.

Jona
04-22-2003, 05:28 PM
And that was my original suggestion--except for ColdFusion, I suggested SSIs.

dr_bozak
04-22-2003, 05:58 PM
indeed you did.

just didn't really equate those to being the same thing.
is a cfinclude like a ssi (server side include?) and can you do ssi's with javascript or where are they used .

Jona
04-22-2003, 06:00 PM
SSI is a .shtml file that is server-parsed. If you put javascript's document.write("[ssi code]"); on there, it will be like that.