Eonwë
Vala, Council
Vala and proud member of the Valar Guild. A quarter century of Tolkien fun.
Posts: 1,323
|
Post by Eonwë on Feb 29, 2004 23:19:43 GMT -5
Ok, I have a puzzler that I have searched many documents for. I am looking for a way in html to load two web pages with one link. The ways I figure this can only be possible are: 1.) A command that load both the web pages at the same time with the same hyperlink.
2.)A command that loads the second web page upon execution of the first.
However, I have been unsuccessful in finding a way to accomplish either method. I'm now requesting help :}
Take care :} Eonwë
|
|
|
Post by BillFerny on Mar 1, 2004 12:29:39 GMT -5
I don't know if this is the only way, but it's what occurred to me.
First, create a frameset, where each of the two (or more) websites load into a separate frame.
Then href the original hyperlink to the frameset.
If this sounds good to you and you want suggestions on the coding, I can help.
~Bill
|
|
|
Post by arathorn on Mar 3, 2004 12:35:06 GMT -5
You could use a couple of javascript lines to open two windows one after another. Depends whether you wanted it in one frameset, as Bill suggests, or in two open windows. The javascript should also be able to load two frames as well, although I've only used it to open separate windows myself.
|
|
|
Post by arathorn on Mar 3, 2004 13:17:47 GMT -5
Ok, figured out how to do it in javascript. I've sent you an email with a zipped solution, in case you check here first.
|
|
Eonwë
Vala, Council
Vala and proud member of the Valar Guild. A quarter century of Tolkien fun.
Posts: 1,323
|
Post by Eonwë on Mar 4, 2004 2:14:11 GMT -5
To Bill Ferny : Thanks, but I think it's not quite what I'm looking for. If I understand you correctly, who suggest I divide a frame into another set of frames to be loaded? Otherwise, if what you say is as simple as it initially sounded, that's not what I'm looking for either, as it would only work to get my original frames back. It's not likely, but the code might be clearer, unless you can explain in a bit more detail :}
Arathorn: Thanks. I'll take a look. I was hoping to find it in html, as I'm pretty sure if it's in another language I've got to section it off into a spot and define its language as javascript before I can use it (I'm not ready to convert to javascript :}). If I can't get an html equivalent, though, at least I've got something to fall back on :}
I'll give you both an example of what I'm looking for. The Games Page has 4 frames. There are links to Players pages in the Left Frame. When these are clicked, they load in the main body (Middle Frame). I want the Right Frame to load a page at the same time.
Thanks for the help so far :} Take care :} Eonwë
|
|
|
Post by Maglor on Mar 4, 2004 3:17:47 GMT -5
I found a good page that explains how to do this with html by itself as well how to do it with javascript. www.jalfrezi.com/frames/fframes.htmIts down near the end under frequently asked questions.
|
|
Eonwë
Vala, Council
Vala and proud member of the Valar Guild. A quarter century of Tolkien fun.
Posts: 1,323
|
Post by Eonwë on Mar 4, 2004 3:44:51 GMT -5
Hmm I looked at the javascript you gave Arathorn.. Not so involved as I thought it might be :}
Maglor: Thanks. This appears to be clarifying what Ferny was explaining (or how I understood it :}), and thus I find after all that it is pretty much what I asked for :} A bit more involved than I was expecting, but I'm surprised it didn't even cross my mind to try this.
Hmm, tough call. One line of code in Javascript per link with no other changes, or change up the division of the Games Page so it's subdivided. Either one should be simple enough and shouldn't paint me into too serious of a corner, unless I find a use for the Right Frame unrelated to the Main Frame :} At the least, both go into my little book of web tricks :}
Thanks to all three of you :} Time to see how much the Principle of Least Priviledge should apply :}
Take care :} Eonwë
|
|
|
Post by arathorn on Mar 4, 2004 4:21:06 GMT -5
Yeah, I tend to go javascript esp. in this type of case because it's less coding and simpler. Because it's using an Href an it's only one line, you can specify that it's javascript right there (don't have to section it off).
6 of one, half dozen of the other <g>.
|
|
|
Post by BillFerny on Mar 4, 2004 12:28:50 GMT -5
Yep. What Maglor said is basically what I meant. I'm no JavaScript coder (only ocassionally I do borrow a section of code that I understand), but I appreciate that it can do many things that I haven't attempted.
Maglor, thanks for the link. It seems (at first glance) to have a couple of useful tips that I didn't already know.
~Bill
|
|
|
Post by arathorn on Mar 4, 2004 17:47:27 GMT -5
Bill,
In case you're interested, here's the single line of Javascript that opens the 2 pages in separate frames (of course the frames have to be set up and the pages written, as per usual) <g>:
<A HREF="javascript:void(parent.frames[0].location.href='side1.htm'); void(parent.frames[2].location.href='side2.htm');">Multiple Page Load</A>
Note that the [0] and [2] refer to the 1st and 3rd frames of the main parent frameset (i.e. if you wanted to load into the second frame, you would use [1]. Arrays in many languages subtract one to identify their element positions.
|
|
|
Post by BillFerny on Mar 6, 2004 18:32:35 GMT -5
Thanks, Arathorn. That's pretty cool.
~Bill
|
|