Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Drop down box opening in new window?

Posted by: mzymblo Sep 29 2010, 12:15 PM

Hi all! What I would to achieve is for the drop list menu to open its links on the same page without opening another window. I load the below page using an inline frame I've listed the code below; thanks so much in advance for the help I have no idea what I'm doing wrong!

==========================================inline frame============================================================

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>


<iframe id="I1" border="0" frameborder="0" name="I1" scrolling="no" src="" style="width: 515px; height: 630px">Your browser does not support inline frames or is currently configured not to display inline frames.



=====================================================main page============================================

<style type="text/css">
.style1 {
background-image: url('');

<table class="style1" style="width: 525; height: 640">
<td> </td>
<div id="zipcodelocate" style="position: absolute; width: 100px; height: 100px; z-index: 1; left: 135px; top: 180px">
<script src=""></script>
<table style="width: 335px;" border="0" cellspacing="1" cellpadding="1">
<td style="width: 158px;">ZIP Code<span style="color: #ff0000;">*</span></td>
<td><input id="zip" maxlength="8" size="8" type="text" name="zip" /></td>
<td style="width: 158px;"><input id="chkRange" value="on" checked="true" type="checkbox" name="chkRange" />Search within</td>
<td><select id="range" name="range" width="80">
<option selected="true">50</option>
</select> Miles </td>
<td style="width: 158px;"><input id="chkRecord" value="on" checked="true" type="checkbox" name="chkRecord" />Centers displayed</td>
<td><select id="record" name="record">
<option selected="true">100</option>
</select> </td>
<td style="width: 158px;"><input id="uid" value="1811" type="hidden" name="uid" /></td>
<td><input onclick="return storelocatorv2();" value="Find Centers" type="button" /></td>
<td style="width: 158px;"></td>
<div id="layer1" style="position: absolute; width: 205px; height: 80px; z-index: 2; left: 210px; top: 370px">
<script type="text/javascript">
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
var selObj = null; with (document) {
if (getElementById) selObj = getElementById(objId);
if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0; }
<form id="form" name="form">
<select style="width: 162px;" id="jumpMenu" name="jumpMenu">
<option selected="true">Select a Center</option>
<option value="">Albright Early Learning Center</option>
</select> <input id="go_button" onclick="MM_jumpMenuGo('jumpMenu','parent',0)" value="Go" type="button" name="go_button" />

Posted by: mzymblo Sep 29 2010, 02:54 PM

***Update*** This opens correctly when the page within the iframe is viewed as a stand alone webapge.

Posted by: Darin McGrew Sep 29 2010, 03:58 PM

Can you provide the URL (address) of a document that demonstrates the problem?

Posted by: mzymblo Sep 30 2010, 07:44 AM

QUOTE(Darin McGrew @ Sep 29 2010, 04:58 PM) *

Can you provide the URL (address) of a document that demonstrates the problem?

It seems to work in Chrome, Thanks for the reply =)

Posted by: Christian J Sep 30 2010, 08:26 AM

When I use the menu it opens in the parent window --isn't that what you want?

Posted by: Darin McGrew Sep 30 2010, 12:22 PM

In what browser(s) do you see the problem?

Posted by: SaraSHarner Oct 7 2010, 06:37 PM

I dont see the problem, it opens ok in my browser, and it's firefox 3.6.10

Posted by: wgabrie Oct 8 2010, 08:12 PM

From what I can tell, mzymblo has a Javascript that links to a new page. However, he/she is dealing with a page within a page.

The outer web page is just an empty wrapper containing an iframe. The iframe contains the redirect script. This causes, and I'm just guessing here that, some web browsers redirect the outer page while others just redirect the inner iframe box to the new location.

Perhaps the Javascript needs take into account iframe awareness to set the desired outcome instead of leaving it up to the browser what to do?

Powered by Invision Power Board (
© Invision Power Services (