Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


HELP! Need popup to check link of parent page and display html based on that link

Posted on 2004-04-08
Medium Priority
Last Modified: 2012-05-04
Hello experts! As the title suggests I would like to make a popup that first checks the link of it’s parent.   Based on that link it then displays the picture for the popup, and also the wood options.  For better understanding of the latter, please view the following page and click on the thumb “stains”.


As you can see the woods are limited to only burl.  However if you had gone to this page and clicked on the “stains thumb”…


You would find that your options are Elm and Gingko.

Currently I am just linking to two separate pages.  I would rather not make a different page for each and every product, so I feel this mini-database would be the answer.  I would also like the page to be cached so the user need only load the list of variables once.

Here is the code of the current popup:
<title>Stains and Hardware</title>
function goto()
     self.resizeTo(document.images[0].width+15, document.images[0].height+132);

function getSelectValue(selObject){
  return selObject.options[selObject.selectedIndex].value;
function chimg(){
  var d = document.forms[0];
  var w = getSelectValue(d.wood);
  var s = getSelectValue(d.stains);
  var h = getSelectValue(d.hardware);
  var elem = document.getElementById("help");
  if(getSelectValue(d.wood) && getSelectValue(d.stains) && getSelectValue(d.hardware)){
  //alert(wood);alert(stain);alert(hardware); //Debugging
  document.images["myimg"].src = "http://www.greenteadesign.com/images/custom/"+ w +"-"+ s +"-"+ h +".jpg";
  elem.innerHTML="<img name=myimg src=http://www.greenteadesign.com/images/custom/"+ w +"-"+ s +"-"+ h +".jpg>";
       return true;
       alert("Please select all options!");
         return false;
<body onLoad=goto() bgcolor="#B6CAAE" style="margin-left: 0; margin-top: 0; margin-bottom: 0; margin-right: 0">
<div align=center valign=middle>
<div id=help><img name=myimg src="http://www.greenteadesign.com/images/custom/burl-gp-bh.jpg" alt=""><br></div>
<table border=0 cellspacing=cellpadding=0>
        <td width=478 height=2 bgcolor="#ffffff"><img src="http://www.greenteadesign.com/images/blank.gif" width=478 height=1><br></td>
        <td width=478 height=2 bgcolor="#647F5B"><img src="http://www.greenteadesign.com/images/darkgreen.gif" alt="" border=0 width=1 height=1><br></td>
<form name=imgform onsubmit="">

<SELECT NAME="wood">
      <OPTION VALUE="">- - - Select Wood - - -</OPTION>
      <OPTION VALUE="burl">Burl</OPTION>

<SELECT NAME="stains">
      <OPTION VALUE="">- - - Select Stain - - -</OPTION>
      <OPTION VALUE="gp">Golden Pecan</OPTION>
      <OPTION VALUE="fw">Fruitwood</OPTION>
      <OPTION VALUE="ro">Red Oak</OPTION>
      <OPTION VALUE="mh">Mahogany</OPTION>
      <OPTION VALUE="ch">Chocolate</OPTION>
      <OPTION VALUE="wn">Walnut</OPTION>

<SELECT NAME="hardware">
      <OPTION VALUE="">- - Select Handle - -</OPTION>
      <OPTION VALUE="bh">Brass Hirute</OPTION>
      <OPTION VALUE="ih">Iron Hirute</OPTION>
      <OPTION VALUE="bw">Brass Warabite</OPTION>
      <OPTION VALUE="iw">Iron Warabite</OPTION>
      <OPTION VALUE="ik">Iron Kakute</OPTION>

<input type=button onClick="return chimg();" value="Go" style="color: #FFFFFF; background-color: #8B987C; border-width: 1; border-style: 1">

<div align=left><font size=+1>&nbsp<b> For more information on how to order this piece <a href="order.html" target=_blank>click here</a>.</b></font></div>


As always, your help is greatly appreciated,

(P.S. Is there a better solution via php?)
Question by:Quarfelburg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 12

Accepted Solution

monosodiumg earned 1000 total points
ID: 10788028
Not sure I see the problem. You can avoid multiple popups by resuing hte same window by giving the popup window a name and then looking for it.
If you can do server side stuff then you need only on php page which takes the type of furniture as an argument and generate the HTML as per your code but with the differnt sets of options. It's output is targeted (target attribute of link or URL arg in window.open) to the popup. You only create the popup window if none exists already (and, optionally, you close it when you go to a different page).


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question