Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-15-2008, 12:24 AM   #1
spunkmaster
Confirmed User
 
spunkmaster's Avatar
 
Join Date: Jan 2004
Posts: 2,052
Help with some .js code

How do I make this open in the same window instead of a new one ?

GoTo = new Array();
GoTo[0]= 'http://www.some url.com';
__________________

spunkmaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2008, 03:08 AM   #2
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
location.href = GoTo[0];
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2008, 07:46 PM   #3
spunkmaster
Confirmed User
 
spunkmaster's Avatar
 
Join Date: Jan 2004
Posts: 2,052
I changed it to location.href = GoTo[0]; but it goes to the
page without being clicked on ?
__________________

spunkmaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2008, 09:53 PM   #4
mikeyddddd
Viva la vulva!
 
mikeyddddd's Avatar
 
Join Date: Mar 2003
Location: you can't please everyone, so you got to please yourself
Posts: 16,557
Put the code into a function:

function name_it_what_ya_want( ) {
GoTo = new Array();
GoTo[0]= 'http://www.some url.com';
location.href = GoTo[0];
}

Make an anchor to use the function:

<a href="javascript:name_it_what_ya_want()">now it goes to some url</a>

Last edited by mikeyddddd; 03-16-2008 at 09:54 PM..
mikeyddddd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2008, 10:01 PM   #5
mikeyddddd
Viva la vulva!
 
mikeyddddd's Avatar
 
Join Date: Mar 2003
Location: you can't please everyone, so you got to please yourself
Posts: 16,557
I assume the GoTo array is a list of URL's you are processing and [0] could be a variable number within the array count?
mikeyddddd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2008, 10:52 PM   #6
spunkmaster
Confirmed User
 
spunkmaster's Avatar
 
Join Date: Jan 2004
Posts: 2,052
When I add this it automatically goes to the new page without being clicked ?
__________________

spunkmaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-17-2008, 04:34 AM   #7
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
spunkmaster, as mikeyddd said, put in in a function and execute it from the href or onclick event...
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.