PDA

View Full Version : Button Problem



Private_Guy
06-27-2007, 01:36 AM
Hi there all,

Hows everybody doing? I have been trying to make a button to be clicked on instead of poping up a window or changing the browser. So I want to click on the button, I dont want it to open a window or do it by itself.

This is the code:

<td><form name="wait" id="wait">
<div align="center" class="style19"> <span class="style18">
<input name="text" type="button" disabled="true" class="lstbox2" id="sect" value="FREE" />
</span></div>
</form></td>
</tr>
</table>
<p align="center">
<script type="text/javascript">
<!--
var secs = 30;
var wait = secs * 1000;
for(i=1;i<=secs;i++) { window.setTimeout("update(" + i + ")", i * 1000); }

window.setTimeout("timer()", wait);

function update(num) {
if(num == (wait/1000)) {
window.location.href = 'complete.php?id=<?=$key?>';
}
else {
printnr = (wait/1000)-num;
document.wait.sect.value = "" + printnr + "";
}
}
//-->
</script>

Thanks very much for your time and support because I know you guys are pro's in this forum.

Best Regards,
Private_Guy

Private_Guy
06-27-2007, 01:43 AM
I tried changing the following code:

window.parent.location = 'complete.php?id=<?=$key?>';
to
onClick = 'complete.php?id=<?=$key?>'; But no success, it didn't work :S

Private_Guy
06-27-2007, 08:10 AM
*Fixed* Thanks anyway