/    Sign up×
Community /Pin to ProfileBookmark

Explorer User Prompt – Insert a Website

I’m using a prompt() to open up the explorer user prompt, and I would like to know how i create it to insert a hyperlink. For example if a user types in [url]www.yahoo.com[/url] it would insert it on the code side as <a target=_blank href=www.yahoo.com>. Note I cannot have quotes because I’m using a Access Database. Then if this is possible, that it could name the link. So the user could also enter in a name, maybe a second prompt? So that on the code side it would insert in as <a target=_blank href=www.yahoo.com>Yahoo!</a>. All I have is the first dialog box created, I have no idea where to go from there.

[CODE]<a href=”#”><img src=”/Images/icons/link.gif” width=”16″ height=”16″ onClick=”prompt(‘Insert Link (For Example: http://msproduction/folder/filename.ext)’)” border=”0″></a>[/CODE]

Edit:: Oh yeah and this will enter into a textarea called “website”

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMay 26.2006 — I'm not 100% sure what you're after here, but...

<a href="#"><img src="/Images/icons/link.gif" width="16" height="16" onclick="

var url = prompt('Insert Link (For Example: http://msproduction/folder/filename.ext)', '');

this.parentNode.href = url;

return true;" border="0"></a>
×

Success!

Help @glitchgirl 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 5.16,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...