Jump to content

eTard

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by eTard

  1. hmm...Kind of follow you.here is what is in the head: <script type="text/JavaScript"><!--function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0;}//--></script> are you saying put your fucntions before the function above? like this <script type="text/JavaScript"><!--// get the value of the select menu. var value = obj.value; // get the index of where the "#" appears in the value var idx = value.indexOf("#"); // if there is a "#"... if(idx > 0) { // get the target from the value using substr. var len = value.length; var targ = value.substr(idx, len); // change the src of the iframe to reflect the target. var myIFrame = document.getElementById('iframeid'); myIFrame.src = "test.html" + targ; }function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0;}//--></script> if I got this correct, what elements in the script do I change? My 3 files are: index.html holds this script and JumpMenu, llisting2.html is the page with the iFrame in it and the iFrame itself (named iframe) is a file called listings.html with the actual states like Arizone...
  2. Okay - I am working on a scenario where I have a drop down JumpMenu. Within that drop down are links that I want to link to certain anchors in an iFrame on different page than what the drop down is on. So, when you select your option from the drop down JumpMenu, it rolls-over too a new page and said new page has an iFrame in it and you link to a specific anchor in that iFrame file.So, I can get the drop down to roll-over to the new page with the iFrame in it just fine, but I cannot get the JumpMenu to find the anchor in that iFrame I want it to. <SELECT name="menu1" onChange="MM_jumpMenu('parent',this,0)"><option value="#" selected>Select Your State</option><option value="no_listing.html">Alabama </option><option value="listing2.html#arizona" target="iframe">Arizona </option><option value="no_listing.html">Arkansas </option></SELECT> see the Arizona option. As it is coded, it rolls-over to listing2.html (which has an iframe on it called "iframe"), but does not find the #Arizona anchor within the iFrame content on that page.I understand the error, but not sure how to correct it. The error is that I am telling the jump menu to link to an #anchor on listing2.html, but the anchor is not actually on listing2.html, but it is in the file that the iFrame calls on listing2.html.So, how do I get the drop down JumpMenu to link to an anchor within a file in an iFrame on another page that the JumpMenu is not on???I can solve it with Frames - and it is done in the onChange - but i want to use a cleaner iFrame.Naturally, this takes 3 pages. The page with the JumpMenu on it, the page that contains the iFrame, the file that is the content of the iFrame. I need tp get page 1 to link to an anchor in page 3 called by page 2...
×
×
  • Create New...