/    Sign up×
Community /Pin to ProfileBookmark

Problem with this thing

this is my script:

[CODE]
<script type=”javascript”>
function killYourSelf() {
var answer = confirm(“Please, do us all a favor and kill yourself”)
if (answer){

location = ‘http://community.scholastic.com/attachments/scholastic/snapshot35/84/1/Thank&#37;20You%20Bodies.jpg’;
}
else{
alert(“Wrong, please try again!”)
}
}
</script>
<a href=”javascript:killYourSelf()”>Click Here</a>

[/CODE]

So bassically, this script opens a confirm box that asks the user to kill themselves, If they press OK, then it should bring them to a picture of bodies that spell “Thank you so much!”, but if they press cancel, than an alert box will be displayed with the text “Wrong, please try again”. I’m sure the code is pretty straight forward, but shut up and help me ?
but when I click the link nothing happens and ithink it has something to do with the confirm(“”)

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Oct 29.2008 — I think you need help and not with your javascript.

Eric
Copy linkTweet thisAlerts:
@ilovelampauthorOct 29.2008 — he he, it's mainly for forums, when you have annoying 8 year oldish people that make stupid post, you provide them with a link to some constructive criticism?

edit: nevermind It works.
Copy linkTweet thisAlerts:
@ZeroKilledOct 29.2008 — the script wouldn't work because of the type value on the script tag. should be: type='[b]text/[/b]javascript'
Copy linkTweet thisAlerts:
@A1ien51Oct 29.2008 — he he, it's mainly for forums, when you have annoying 8 year oldish people that make stupid post, you provide them with a link to some constructive criticism?

edit: nevermind It works.[/QUOTE]


no comment...
×

Success!

Help @ilovelamp 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.6,
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,
)...