pauraque_bk: (dance)
[personal profile] pauraque_bk
Well, 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, [livejournal.com profile] 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...

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'."))
{
window.location="index.html"
}
...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?

Re: Javascript

Date: 2005-07-06 07:38 pm (UTC)
ext_3485: (Default)
From: [identity profile] cschick.livejournal.com
I'm going to bet that using the self-referential variable this is involved.

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)
ext_3485: (Default)
From: [identity profile] cschick.livejournal.com
Hmmm. Okay, those didn't work for me.

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)
pauraque: patterned brown and white bird flying on a pale blue background (Default)
From: [personal profile] pauraque
Sorry, return; where? window.location=this.href; return true|false; ? Or am I remembering something else? (I haven't used Javascript for anything in a a long time.)

Re: Javascript

Date: 2005-07-06 09:53 pm (UTC)
ext_3485: (Default)
From: [identity profile] cschick.livejournal.com
Okay, this is why I don't work with Javascript--I don't have enough of a clue about it, and it's this jumbled confusion of languages I do know.

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)
ext_3485: (Default)
From: [identity profile] cschick.livejournal.com
I'm ready to pound my head against something . . . I keep getting things that work, then I change them slightly and they don't work any more. Like the onclick thing I posted and deleted--it worked and then I tested it again and it didn't. I'm sorry--I think I've not been of much help, actually.

Profile

pauraque_bk: (Default)
pauraque_bk

April 2017

S M T W T F S
      1
23 4 5678
91011 12 13 1415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 30th, 2026 05:55 pm
Powered by Dreamwidth Studios