![]() |
![]() ![]() |
![]() |
akkw |
![]()
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 |
![]()
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 |
![]()
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 |
![]()
Post
#4
|
🌟Computer says no🌟 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 20,737 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 |
![]()
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 |
![]()
Post
#6
|
Group: Members Posts: 4 Joined: 6-August 08 Member No.: 6,359 ![]() |
Thanks for the suggestions.
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 14th June 2024 - 12:40 PM |