Foo - who knows Javascript???

Bikeforums.net is a forum about nothing but bikes. Our community can help you find information about hard-to-find and localized information like bicycle tours, specialties like where in your area to have your recumbent bike serviced, or what are the best bicycle tires and seats for the activities you use your bike for.




View Full Version : who knows Javascript???


closereveryday
02-07-04, 08:46 PM
i need help...what's the js for centering a pop-up window???

I'm trying to create a pop-up, I have the size and window features:

height=400,width=400,toolbar=no,scrollbars=yes...etc etc, but I can't figure out centering, i can position via pixel placement...left=50,top=50

i think it's a formula of some sort

any help appreciated


pitboss
02-07-04, 09:02 PM
One resource you can try:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=centering+a+pop-up+window+with+javascript

Google groups is a good place to start. That's how I dig the BS out of registry whenever needed.
Give it a spin...you may just find what you need!

geneman
02-07-04, 09:48 PM
Go find a site that uses centered pop-ups and "lift" a little code. It's a js tradition (as long as you cite the owner that is).

-mark


closereveryday
02-07-04, 10:52 PM
One resource you can try:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=centering+a+pop-up+window+with+javascript

Google groups is a good place to start. That's how I dig the BS out of registry whenever needed.
Give it a spin...you may just find what you need!

THANK YOU, that link helps a lot, never knew these groups existed. The first few hits were way confusing, seems I have to add variables and then a division formula arhhhh !!! I think I'll just specify left and top px coordinates.


Go find a site that uses centered pop-ups and "lift" a little code. It's a js tradition (as long as you cite the owner that is).

-mark

Go tip, I try that but I'm an artist (non-linear thinking) and when I "view source" I get a migraine !!! :crash:

iamlucky13
02-08-04, 01:53 PM
It's more of a resource for specific scripts, but you might also check out http://hotscripts.com/ for help with this or other projects.

cycletourist
02-08-04, 02:26 PM
JavaScript- UGHH!
HTML and CSS I can handle. And WCTL (web crossing template language). But JS, forget it.

poululla
02-12-04, 09:22 AM
Please do not create more pop-ups - my pop-up killer needs a break... :D :D :rolleyes: :rolleyes:

Maelstrom
02-12-04, 11:01 AM
www.sitepoint.com is another good site for tutorials and stuff.

closereveryday
02-12-04, 03:00 PM
Please do not create more pop-ups - my pop-up killer needs a break... :D :D :rolleyes: :rolleyes:

nah, I'm not doing those evil rapid-fire pop-ups and pop-unders, this is a personal site...pop-ups by choice


It's more of a resource for specific scripts, but you might also check out http://hotscripts.com/ for help with this or other p

JavaScript- UGHH!

Posted by Maelstrom - 02-12-04 at 10:01 AM
www.sitepoint.com is another good site for tutorials and stuff.

Thanks for all the input, the fustrating part is alot of sites give free cut-paste scripts but it's still difficult trying to put them inside the right <tags>, God forbid you leave out a space or parthesis...:crash:

Maelstrom
02-12-04, 03:24 PM
Sitepoint offers full tutorials. Go to their forums, they have one of the strongest around. They have a 5 part (I believe) javascript tutorial to help you out and it is very good.

As for syntax errors, welcome to coding.

If you don't like them consider finding the Marcromedia suite and skip the coding yourself and let the program generate it. It isn't pretty but it works.

closereveryday
02-12-04, 06:22 PM
Sitepoint offers full tutorials. Go to their forums, they have one of the strongest around. They have a 5 part (I believe) javascript tutorial to help you out and it is very good.

As for syntax errors, welcome to coding.

If you don't like them consider finding the Marcromedia suite and skip the coding yourself and let the program generate it. It isn't pretty but it works.

Thanks, yeah I was also looking for a way to close a window by clicking inside it...turns out you can only close a window via javascript IF the window was open via javascript...:rolleyes: I hate javascript >>> :crash: :crash: :crash:

Maelstrom
02-12-04, 07:54 PM
Thats a new thing. Javascript used to be able to close any window...but it is a big security risk to have that much control over a window.

Moonshot
02-12-04, 08:09 PM
Hey, even adbots tryin' to help ya!

Atta boy, adbot!