Help - Search - Members - Calendar
Full Version: Problem with IFrames loading via drop down menu
HTMLHelp Forums > Programming > Client-side Scripting
sp4585
I have a website constructed with tables and server side includes...

Here's the snippet in question:

CODE

<center>
    <img src="images/recipesbanner.jpg" />
</center>
<p>
<script language="JavaScript">

var theTarget = "_recipes";

function goThere(){
if(!document.theForm.theMenu.selectedIndex==""){
window.open(document.theForm.theMenu.options[document.theForm.theMenu.selectedIndex].value,theTarget,"");}}

</script>


<form name="theForm">
<select name="theMenu" size=1 onChange="goThere()">
  <option selected value="">2007 Recipes
  <option value="recipes_september07.html">September
  <option value="recipes_october07.html">October
  <option value="recipes_november07.html">November
  <option value="recipes_december07.html">December
</select>
</form>
</p>

<p>
<iframe id="_recipes"
src ="recipes_september07.html"
width="100%" height="350">
</iframe>
</p>


This works well when in preview mode in GoLive, but on the live site, it seems to be attempting to draw up a pop-up AND the content in the iFrame is drawing as File Not Found.

Any and all help is appreciated! Thanks!
pandy
I don't know about GoLive, but in the real world window.open() opens a new window. Don't see anything that would open a page in a frame. blink.gif
Darin McGrew
And FWIW, according to the spec, browsers should ignore target names that begin with an underscore (e.g., "_recipes"), but which aren't one of the four reserved values with special meanings (i.e., "_blank", "_self", "_parent", and "_top").
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.