I have a new computer.
Jul. 6th, 2005 12:11 pmWell, my brother has a new computer, but he lives with me, so he gets to share. (Hey, I pay for the internet. And the electricity.) It runs XP, which doesn't exactly thrill me -- turn your head ninety degrees to the left and you'll see the face I make at it. But it has a functional registry, a functional video card, a non-abandonware sound card, and a non-tiny hard drive, so it beats the old computer.
Thus, my email woes are over, and I can once again reliably get mail at eo at morosophy dot com.
And hey, look,
scribbulus_ink's running the Candy is Dandy challenge again this year. Sweet fun for all.
Oh, and I had a Javascript question. I know that if I do this...
Thus, my email woes are over, and I can once again reliably get mail at eo at morosophy dot com.
And hey, look,
Oh, and I had a Javascript question. I know that if I do this...
if (!confirm("This story is rated NC-17 for explicit penguin sex. If you are hot for those cold, cold birds, click 'OK'. If not, click 'Cancel'."))...clicking OK will let them through, and clicking Cancel will redirect them to index.html. What I can't remember is how you do it so that they aren't redirected, but simply stay on the page where they clicked the link. Help?
{
window.location="index.html"
}
Re: Javascript
Date: 2005-07-06 07:38 pm (UTC)Having almost never worked with Javascript . . . try
window.location="this"
or
window.location="this.href"
or
window.location=this
Re: Javascript
Date: 2005-07-06 07:49 pm (UTC)But using break; or return; both did, although they oddly put a ? at the end of the URL.
Re: Javascript
Date: 2005-07-06 09:24 pm (UTC)Re: Javascript
Date: 2005-07-06 09:53 pm (UTC)if (!confirm("This story is rated NC-17 for explicit penguin sex. If you are hot for those cold, cold birds, click 'OK'. If not, click 'Cancel'."))
{
return;
}
That worked for me, without throwing errors.
(And I deleted the whole other thread because it got confusing.)
Re: Javascript
Date: 2005-07-06 10:30 pm (UTC)