GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   javascript question (https://gfy.com/showthread.php?t=1032320)

amateurbfs 07-30-2011 10:57 AM

javascript question
 
This is probably vague, I don't really know what I am doing. :helpme :1orglaugh

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>


MediaGuy 07-30-2011 11:27 AM

Just make the link in the page the frame shows open ''_top"....

:D

amateurbfs 07-30-2011 11:49 AM

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.

sarettah 07-30-2011 03:25 PM

use parent.location to make the parent page go to the url you want.

parent.location = menuObj.options[menuObj.selectedIndex].value;


All times are GMT -7. The time now is 05:57 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc