calypsoworld
asked on
Change hyperlinks target to "newtab" only in one page
Hi!
I have a page that shouldn't be closed or changed to another one without user confirmation.
So, to avoid closing the window, I'll add some JavaScript code to alert the user.
But I have HyperLinks in masterpage that loads on same page, but in this page, these links must be target to load on another tab (to keep the page open).
I'm thinking to do it by getting all the HyperLinks from masterpage and changing, programatically, the target to "newtab" in page load method.
And I have to do same thing (but targeting to "sametab") with other pages.
There is a better way to do that?
Thanks in advance!
I have a page that shouldn't be closed or changed to another one without user confirmation.
So, to avoid closing the window, I'll add some JavaScript code to alert the user.
But I have HyperLinks in masterpage that loads on same page, but in this page, these links must be target to load on another tab (to keep the page open).
I'm thinking to do it by getting all the HyperLinks from masterpage and changing, programatically, the target to "newtab" in page load method.
And I have to do same thing (but targeting to "sametab") with other pages.
There is a better way to do that?
Thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What about if I use another MasterPage with this page?
Maybe it would be easier, right?
Maybe it would be easier, right?
ASKER
Thank you!
Whatever involves the least effort for you is the one I'd choose.