/    Sign up×
Community /Pin to ProfileBookmark

HELP! Make text appear after clicking a link?

What I want to do is make a link appear after a user clicks a link, which would make a new tab open. So basically, the user clicks the link and it opens in a new tab, and back on the website a link appears.

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@TheBearMayJun 24.2010 — This should be close:[code=html]
<a href="#" onclick="window.open('newLink.htm');this.style.display='none'">Click Me</a>[/code]
Copy linkTweet thisAlerts:
@Lukedude100authorJun 24.2010 — This should be close:[code=html]
<a href="#" onclick="window.open('newLink.htm');this.style.display='none'">Click Me</a>[/code]
[/QUOTE]


But that just opens it to a new tab. No new text displays after clicking it.
Copy linkTweet thisAlerts:
@TheBearMayJun 25.2010 — .....and what would you like to have display and where????
Copy linkTweet thisAlerts:
@Lukedude100authorJun 25.2010 — I would like a URL that says "Please click here to continue" after they click the link.
Copy linkTweet thisAlerts:
@TheBearMayJun 25.2010 — Several ways to do that but the straightest is probably similar to:

[code=html]<a href="#" onclick="window.open('newLink.htm');this.style.display='none';document.getElementById('newLink').style.display='inline'">Click Me</a>
<a href="#" onclick="dosomething()" style="display:none" id="newLink">Click Here to Continue</a>[/code]
Copy linkTweet thisAlerts:
@Lukedude100authorJun 25.2010 — Ok, thanks.
×

Success!

Help @Lukedude100 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...