View Single Post
Old 07-08-2011, 02:01 PM   PM User | #3
phily245
New to the CF scene

 
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
phily245 is an unknown quantity at this point
You were right, I was missing this bit of code from my header:
Code:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
//-->
</script>
The popup now works, however the value isn't being passed properly between the radio button which selects the templates and the Javascript, so it now ouputs a url of "www.mysite.com/admin/preview_mailing.php?template=undefined". Here is the html result of the php which adds the radio buttons:
Code:
<label for="cat">Newsletter Template<br /><br /> 
                <div id="div"><input type="radio" name="template" value="1" id="template"checked="checked" /> 
     Standard<br/><img src="../newsletter/standard.gif" width="100" style="border: 2px #D50072 solid;"/></div>                
                </label>
This should be passed to the popup opener by this script:
Code:
<script>
				function get_radio_value()
				{
				for (var i=0; i < document.add_form.template.length; i++)
				   {
				   if (document.add_form.template[i].checked)
					  {
					  return rad_val = document.add_form.template[i].value;
					  }
				   }
				}

				</script>
Any ideas?
phily245 is offline   Reply With Quote