javascript popups
ok...i have researched this, and i cant find out how to do it the way i want. i need a pop up window to come up when you click on a link, but not until then...the problem is...the link is inside a javascript menu already...what do i do?
zollet posted this at 18:16 — 12th August 2002.
He has: 1,016 posts
Joined: May 2002
Click here
Suzanne posted this at 19:09 — 12th August 2002.
She has: 5,507 posts
Joined: Feb 2000
if you have control over the link itself you can use the code zollet suggested (or zerocattle.com/examples/popUp.html for one that's better for the user and search engines), but if you don't, you may not have the ability to do it.
kb posted this at 19:21 — 12th August 2002.
He has: 1,380 posts
Joined: Feb 2002
addChildmenuItem("http://www.hotscripts.com/","HotScripts","","");
'is the link inside the js menu
kb posted this at 20:13 — 12th August 2002.
He has: 1,380 posts
Joined: Feb 2002
i mean something like the javascript:history.back()
lol...i dunno if there is something like this, maybe its just non-existant..."javascript:new.windo(http://url.com)" lol
Suzanne posted this at 01:24 — 13th August 2002.
She has: 5,507 posts
Joined: Feb 2000
If you read the url I sent you, you would see that you could make the link like this:
addChildmenuItem
("javascript:popUp('http://www.hotscripts.com/',
'name of window','width=xxx,height=xxx')
","HotScripts","","");
That *should* work. xxx would hopefully obviously be the actual numbers for width and height. Remove all hard returns (only in place so the board won't scroll).
The Webmistress posted this at 06:50 — 13th August 2002.
She has: 5,586 posts
Joined: Feb 2001
Suzanne the url is bringing up a 404!
Suzanne posted this at 07:52 — 13th August 2002.
She has: 5,507 posts
Joined: Feb 2000
Thanks, Julia, I fixed it. Forgot to capitalize the U.
kb posted this at 15:53 — 13th August 2002.
He has: 1,380 posts
Joined: Feb 2002
i did read it...its a dead link...but i see you fixed it...thanks
kb posted this at 16:00 — 13th August 2002.
He has: 1,380 posts
Joined: Feb 2002
ok....i tried it...the first time i tried it verbatim (without the width and height..i figured that could set on its own, it should just be a regular window)...i got a 404...the second time, i tried it as "javascript" instead of "java script" and i got a javascript error...on line 1 character 1, and it said an object was expected...
Suzanne posted this at 21:57 — 13th August 2002.
She has: 5,507 posts
Joined: Feb 2000
Kyle, you don't know the first thing about JavaScript, right?
Okay:
1. The board automatically changes the word to java script so people can't put scripts up and break the board.
2. Did you put the function in your header?
3. When mixing JavaScript scripts, you may have conflicts. You must know at least a little bit to get it working.
4. You can't just leave out pieces of JavaScript. If you don't want the width, height parts, you'll still have to have and empty set ''
5. AS ALWAYS, a url where people can see where you're screwing up live is the best way to get help. SET UP A DUMMY PAGE IF YOU NEED TO.
kb posted this at 16:15 — 14th August 2002.
He has: 1,380 posts
Joined: Feb 2002
haha...you caught me...anyways...i did catch on to the "javascript" word spreader thing...but i forgot to mention that this whole thing is a .js file...its not embedded, i have a few scripts in the header of my main .html document that calls out this script...but its not directly on the page...and i will try to setup a dummy page...we'll see what happens
Suzanne posted this at 16:51 — 14th August 2002.
She has: 5,507 posts
Joined: Feb 2000
I meant the script that I pointed you to -- it won't work if you don't have that function in your tags. You really should at least figure out how JavaScript works, for your own sanity, even if you don't intend to write your own scripts.
kb posted this at 16:53 — 14th August 2002.
He has: 1,380 posts
Joined: Feb 2002
lol...thanks...lol
kb posted this at 17:12 — 14th August 2002.
He has: 1,380 posts
Joined: Feb 2002
i decided to give up...it isnt worth all this trouble...the way it is works fine ...*sigh*...o well, thanks anyways
openmind posted this at 21:45 — 14th August 2002.
He has: 945 posts
Joined: Aug 2001
I tried to learn JavaScript once and thats what sent me the way I am now....wibble....I'm a fish....
kb posted this at 01:18 — 15th August 2002.
He has: 1,380 posts
Joined: Feb 2002
haha....i dont write javascript...hurts my head
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.