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 Mark Forums Read
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 07-30-2011, 10:57 AM   #1
amateurbfs
Confirmed User
 
amateurbfs's Avatar
 
Join Date: Jun 2010
Posts: 1,316
javascript question

This is probably vague, I don't really know what I am doing.

Doing this inside of a frame, I want to open in _top not the same frame the code is in.

Code:
<select name="page_id" id="page_id"  onchange="javascript:dropdown_post_js(this)">
Code:
<script type="text/javascript">

function dropdown_post_js(menuObj) {

	var i = menuObj.selectedIndex;

	

	if(i > 0)

	{

	if(menuObj.options[i].value != '#')

		{

			window.location = menuObj.options[i].value;

		}

	}

}

</script>
__________________

Last edited by amateurbfs; 07-30-2011 at 10:59 AM..
amateurbfs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-30-2011, 11:27 AM   #2
MediaGuy
Confirmed User
 
MediaGuy's Avatar
 
Industry Role:
Join Date: Sep 2004
Location: Montrealquebecanada
Posts: 5,500
Just make the link in the page the frame shows open ''_top"....

:D
__________________

YOU Are Industry News!
Press Releases: pr[at]payoutmag.com
Facebook: Payout Magazine! Facebook: MIKEB!
ICQ: 248843947
Skype: Mediaguy1
MediaGuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-30-2011, 11:49 AM   #3
amateurbfs
Confirmed User
 
amateurbfs's Avatar
 
Join Date: Jun 2010
Posts: 1,316
cant do that, since the links are in a select form I believe I need the javascript

Code:
<script type="text/javascript">

function dropdown_post_js(menuObj) {
        if(menuObj.options[menuObj.selectedIndex].value.length > 0)
        window.open(menuObj.options[menuObj.selectedIndex].value);
}

</script>
this will open them in _blank, really I just wanna send these guys back to my site w/ no frames, same window.
__________________
amateurbfs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-30-2011, 03:25 PM   #4
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,057
use parent.location to make the parent page go to the url you want.

parent.location = menuObj.options[menuObj.selectedIndex].value;
__________________
All cookies cleared!
sarettah 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
Thread Tools



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.