opening <a> link in different <div> of same window |
opening <a> link in different <div> of same window |
akkw |
Aug 6 2008, 07:49 PM
Post
#1
|
Group: Members Posts: 4 Joined: 6-August 08 Member No.: 6,359 |
Greetings: How can one target an anchor <a> to open a file in another <div> in the same window, i.e. <div id="right"> <a href="newfile.txt" target="left">Open new file</a> </div> <div id="left"> </div> Apologies for this simple question. Thanks. Alfred |
Darin McGrew |
Aug 6 2008, 08:09 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
You can't. You can target a frame (either a regular frame or an inline frame, but frames have their own problems. Of course, the JavaScript approach has the same problems of frames, plus the extra JavaScript dependency.
A better approach is to have a separate URL for each document, and to link to the other URLs. |
Website Design Perth |
Aug 6 2008, 08:21 PM
Post
#3
|
Newbie Group: Members Posts: 14 Joined: 6-August 08 From: Perth, Western Australia Member No.: 6,367 |
Have a look at the jQuery javascript library. This is what we use, for example, to 'hide' a div on page load, and then 'display' it on click of a link/button.
|
pandy |
Aug 6 2008, 08:53 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Which isn't the same as opening another page. Why do you use jQuery for something that basic BTW?
|
Website Design Perth |
Aug 6 2008, 11:01 PM
Post
#5
|
Newbie Group: Members Posts: 14 Joined: 6-August 08 From: Perth, Western Australia Member No.: 6,367 |
True - I was referring to the original post.
Usually because it's not the only kind of functionality we employ. |
akkw |
Aug 7 2008, 07:49 PM
Post
#6
|
Group: Members Posts: 4 Joined: 6-August 08 Member No.: 6,359 |
Thanks for the suggestions.
|
Lo-Fi Version | Time is now: 24th April 2024 - 10:32 PM |