Link to home
Start Free TrialLog in
Avatar of calypsoworld
calypsoworldFlag for Portugal

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!
Avatar of Yiogi
Yiogi

I can only think of two ways. One is the one you mention doing it programmatically the second one would be to have a content control in your master page for the links that you can replace in the child pages whenever you need to.

Whatever involves the least effort for you is the one I'd choose.
ASKER CERTIFIED SOLUTION
Avatar of KiasChaos83
KiasChaos83
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of calypsoworld

ASKER

What about if I use another MasterPage with this page?
Maybe it would be easier, right?
Thank you!