/    Sign up×
Community /Pin to ProfileBookmark

Insert textstr and loop function alert

I need(want) answers to two questions. one, how could I make so there would be two pieces to a hyperlink ref. and there would be a textbox so you could type something you wanted to go inbetween there? and second, How could I make a button that onClick or whatever shows an alert that loops?
I know how to do alerts and functions and how to make button and text input types, but not the two questions above.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterMay 30.2005 — A button that onclick pop-ups an alert 5 times via a loop:
<i>
</i>&lt;input type="button" onclick="fiveAlerts()" value=" alert 5x "&gt;
&lt;script type="text/javascript"&gt;
function fiveAlerts(){
for(var i=1;i&lt;=5;i++)
alert(i)
}
&lt;/script&gt;

Copy linkTweet thisAlerts:
@BigOauthorMay 30.2005 — Ah, thank you so much! Now, if it is not too much trouble, could anyone tell me how to insert a word in the middle of a href via textbox. I would value it if you could tell me. Also, thank you Ultimater
Copy linkTweet thisAlerts:
@UltimaterMay 31.2005 — TEXTAREAs generally don't support HTML. However, you can use designMode() or a contenteditable DIV. This area of JavaScript is quite complex.

Make it easy on your self and use an already existing script:

[url=http://kevinroth.com/rte/demo.htm]Rich Text Editor[/url]
×

Success!

Help @BigO 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.20,
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,
)...