/    Sign up×
Community /Pin to ProfileBookmark

Javascript box with choices

Hi !

I’ve made a Javascript Link box.
The admins can make new articles and in admin view they can also put in LINKS in the text.

To make LINK they have to mark the text they want the link to work with and the press a button called : LINK.
Then a popupbox apears where they must type in the HTTP for the link.
When link is made the link opens in DEFAULT = NEW BROWSER WINDOW.

How can I make a radiobutton/checkbox in the link popupbox so that, if you select that radiobutton/checkbox the link you have typed in ahead will open in _SELF .. in the same window which allready is opened.

PLZ HELP !

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@JonaApr 03.2003 — Prompts cannot contain form elements. Unless you mean on the page that prompts you want an if(radiobutton_one is checked) sort of function...
Copy linkTweet thisAlerts:
@MulticaseauthorApr 04.2003 — Yes that is the function im after...

Plz explain how to make that happen...
Copy linkTweet thisAlerts:
@JonaApr 04.2003 — Something like this:

<html><head>

<script>

function foo(){if(document.f1.elements[0].selected){ window.open("file.html");}else{location="file.html";} }

</script>

</head><body><form name="f1">

Open in:<br>

new window <input type=radio name="rio"><br>

same window <input type=radio name="rio"><br>

<input type=button value="Open" onClick="foo()">

</form></body></html>
Copy linkTweet thisAlerts:
@MulticaseauthorApr 04.2003 — Thank you fro your help!
×

Success!

Help @Multicase 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.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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