title: How can I pass data to a JavaScript "popup" div?
body: <p>I am using a a href "Click Here" link in the page and if we click it will open a pop up contact form using javascript, here i need to get the value say like "id" into that popup from the a href so that i can manipulate the contact form,</p>
  
  <pre><code>&lt;a href="javascript:showDiv('Showcase_10','&lt;?=$mainrow[1]?&gt;')"&gt;Click Here&lt;/a&gt;
  </code></pre>
  
  <p>javascript function:</p>
  
  <pre><code>function showDiv(DisplayDiv) { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
   if(document.getElementById("simpleMap"))
   {
    document.getElementById("simpleMap").style.visibility = 'hidden';
   }
   document.getElementById(DisplayDiv).style.visibility = 'visible'; 
  } 
  else { 
  if (document.layers) { // Netscape 4 
  document.DisplayDiv.visibility = 'visible'; 
  } 
  else { // IE 4 
  document.all.DisplayDiv.style.visibility = 'visible'; 
  } 
  } 
  }
  </code></pre>
  
  <p>Popup Screen:</p>
  
  <pre><code>&lt;div id="Showcase_10" style="visibility:hidden;"&gt;
  
  &lt;div id="fade"&gt;&lt;/div&gt;
  &lt;div class="popup_block"&gt;
  &lt;div class="popup"&gt;
  &lt;form action='result.php' onSubmit="return valid()" method="post"&gt;
  &lt;input type="hidden" name="siteid" value="&lt;? echo $_REQUEST['siteid']; ?&gt;"&gt; &lt;table width="90%" bgcolor="#eff8ff" border="0" style="border:solid; border-width:1px; border-color:#ccc" align="center" cellpadding="2" cellspacing="3" class="small-content"&gt;
  &lt;tr&gt;&lt;td width="6%"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td colspan="2" align="left" class="subhead"&gt;Email Property Details&lt;/td&gt;
  &lt;/tr&gt;&lt;tr&gt;&lt;td width="6%"&gt;&amp;nbsp;&lt;/td&gt;&lt;td class="cont"&gt;Request more information, make an appointment or ask a question. &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td width="6%"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td width="94%"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;br/&gt;
  &lt;input name="name" type="text" class="field1" value=""/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#FF0000"&gt;&lt;strong&gt;*&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;
  &lt;td width="6%"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td width="94%"&gt;&lt;strong&gt;Your Email&lt;/strong&gt;&lt;br /&gt;
  &lt;input name="email" type="text" class="field1" id="textfield2" value=''/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#FF0000"&gt;&lt;strong&gt;*&lt;/strong&gt;&lt;/font&gt;&lt;br /&gt;
  &lt;font color="#FF0000" style="font-family: Verdana, sans-serif;font-size : 9pt;" class="form-list"&gt;
  &lt;/font&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;td colspan="2" align="center"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>