|
-
Oct 18th, 2001, 09:22 AM
#1
Thread Starter
Addicted Member
loading 2 pages in 1 click
Hi!
I've got a page with 3 frames in it like this
Code:
_______________
| | |
| | |
| | B |
|A | |
| | |
| |___________|
|___|____C______|
In frame A I have a load of links. Some of them I want to just change frame B but others I want to change frame B & C.
The 1st bit is easy but i can't do the 2nd bit with straight HTML (at least I can't think of a way) so I was wondering if anyone knew of a way you can do it in Javascript.
Thanks a lot
Mrs K
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Oct 18th, 2001, 09:25 AM
#2
Member
Using the <a href="whatever.html" target="a"> thing I'm pretty sure you can't, but JavaScript can do it...
-
Oct 18th, 2001, 10:27 AM
#3
Thread Starter
Addicted Member
ooohh just worked it out!!!!
This was the code that did it!
Code:
<A href="file1.html" target=C onClick="parent.frames['B'].location = 'file2.html';">Click Here</A>
so you could change as many frames as you liked!!!
ooohh this Document Object Model isn't as stupid as it looks.
Anyone know of a good diagram of it?
Thanks
Mrs K
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Oct 18th, 2001, 10:39 AM
#4
Originally posted by filburt1
Using the <a href="whatever.html" target="a"> thing I'm pretty sure you can't, but JavaScript can do it...
god Arien, if you don't know the answer don't reply to the post just to get you post count up. I am pretty sure she knows you can't do it that way. then you tell her that javascript can do it. well tell her the code or tell her where to look.
Mrs. K that was it. also you can put that in to a function if you wanted. as far as a diagram, of what?
I will find some links for the DOM for ya.
-
Oct 18th, 2001, 02:36 PM
#5
-
Oct 18th, 2001, 03:55 PM
#6
Thread Starter
Addicted Member
thanks for that! That'll be another 2 pages to build into my collection of online resources!
I'll slowly build up a picture of it all!
Thanks alot
Mrs K
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Oct 25th, 2001, 06:15 AM
#7
Thread Starter
Addicted Member
Found a pretty good model of the DOM its here...
http://www.paschools.pa.sk.ca/javascript/objects.htm
it then has a lovely listing of properties and methods!!!!
Just thought I would post this if anyone else wanted to see it!
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Oct 28th, 2001, 10:12 PM
#8
PowerPoster
If you want a non-js way of doing this...
Put frame B & C into another 'frame' page.
So your main do would appear:
___________
| | |
| A | B |
| | |
| | |
| | |
|__|________|
Frame B would be like:
___________
| |
| |
| C |
| |
|___________|
| D |
|___________|
So, from frame A, you can set your target in the links to be B if you want to change both C&D, or you can set it to C/D to change each appropriately.
There are a million reasons NOT to do this, but I like to display my creative genius... 
Not ideal, but just another idea, and it'll work ok, I would think. Depends on your page structure, site size etc.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 28th, 2001, 10:13 PM
#9
PowerPoster
GODDAMN IT!!!
I hate it when my spaces/tabs disappear....
I hope you got the idea from the screwed up picture...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 28th, 2001, 10:16 PM
#10
Member
Originally posted by rjlohan
GODDAMN IT!!!
I hate it when my spaces/tabs disappear....
I hope you got the idea from the screwed up picture...
At the risk of being flamed for making a useless post..if you enclose the picture in [code][/code] tags, it will preserve the spaces.
-
Oct 28th, 2001, 10:18 PM
#11
PowerPoster
Cheers. It prints my other spaces, why not those ones?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 28th, 2001, 10:23 PM
#12
Member
In HTML, two or more spaces in a row get "simplified" to one space.
-
Oct 28th, 2001, 11:32 PM
#13
Good Ol' Platypus
To fix it every other one has to be an (non-breaking space) or whatever ASCII code it is.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 29th, 2001, 06:51 AM
#14
Member
Originally posted by Sastraxi
To fix it every other one has to be an (non-breaking space) or whatever ASCII code it is.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|