finerpleasures
Regular Member
- Feb 17, 2009
- 337
- 100
Hey guys, i have no knowledge of javascript but i desperately need this script to open in the same window. So far, it keep coming up as a pop up of somesort please help me out.
Code:
<div align="center"><center>
<form name="StatPac_Survey_Software" action="javascript:open_survey_software_results()" method="POST">
<input type="hidden" name="poll_id" value="12030711501177">
<input type="hidden" name="ip_check" value="0">
<input type="hidden" name="cookie_check" value="1">
<input type="hidden" name="time_out" value="5/5/2013">
<input type="hidden" name="view_results_before" value="0">
<input type="hidden" name="view_results_after" value="1">
<input type="hidden" name="view_mode" value="0">
<input type="hidden" name="sorted" value="1">
<input type="hidden" name="graph" value="1">
<input type="hidden" name="graph_width" value="200">
<input type="hidden" name="graph_bgColor" value="#DDDDDD">
<input type="hidden" name="graph_color" value="#000000">
<input type="hidden" name="font_name" value="Arial">
<input type="hidden" name="font_size" value="2">
<input type="hidden" name="title_bar" value="Survey Results">
<input type="hidden" name="vote" value="">
<table border="1" cellpadding="1" cellspacing="0" bordercolor="#111111" width="200px">
<tr>
<td width="100%" bgcolor="#DDDDDD"><font face="Arial" size="2" color="#000000"><b>Where was Lady GaGa Born ?</b></font></td>
</tr>
<tr>
<td width="100%" valign="top" bgcolor="#FFFFFF">
<font face="Arial" size="2" color="#000000">
  <input type="radio" name="Choice" value="1">New Jersey<br>
  <input type="radio" name="Choice" value="2">Manhattan<br>
  <input type="radio" name="Choice" value="3">Seattle<br>
  <input type="radio" name="Choice" value="4">Canada
</font>
<p></p>
<p align="center"><font face="Arial" size="1">
<input type="submit" name="button" value="Am I Correct ">
</font></p>
<p></p>
<p align="center"><font face="Arial" size="1">
<!-- Online survey software: Copyright 2006-2011 StatPac Survey Software
Please do not remove this copyright notice or link -->
StatPac <a href="http://www.statpac.com/online-surveys">online survey</a>
</font></p>
</td>
</tr>
</table>
<input type="hidden" name="question" value="Where was Lady GaGa Born ?">
<input type="hidden" name="choices" value="1^^New Jersey::2^^Manhattan::3^^Seattle::4^^Canada::">
<script>
view=false;
function view_only() {
view=true;
document.StatPac_Survey_Software.submit();
}
function open_survey_software_results() {
for (i=0;i<document.StatPac_Survey_Software.Choice.length;i++){
if (document.StatPac_Survey_Software.Choice[i].checked==true){
document.StatPac_Survey_Software.vote.value=""+(i+1);
}
}
if ((document.StatPac_Survey_Software.vote.value=="") && (view==false)){
alert ("Please make a selection.");
return;
}
if (view==true) {
document.StatPac_Survey_Software.view_mode.value="1";
} else {
document.StatPac_Survey_Software.view_mode.value="0";
}
view=false;
url = "http://www.facebook.com/";
args = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=200,left=20,top=20';
result = window.open(url, "survey_software", args);
}
</script>
</form>
</center></div>