useful innerHTML

useful innerHTML

Postby daniel on Thu Sep 20, 2007 11:50 am

if you need to display a value at the top of the page and you're struggling with php, use javascript innerHTML....


<tr>
<td colspan="10">&nbsp;</td>
<td align="right" id="generate_btn">
</td>
</tr>

$nextyr=year +1;

$mesx = <<<EOF
<script type="text/javascript">
document.getElementById("generate_btn").innerHTML='<input type="submit" value="generate $nextyr" name="generate" onclick="document.location.href=eaform.php?year=$nextyr"'
</script>
EOF;

echo $mesx;
daniel
Site Admin
 
Posts: 28
Joined: Fri Jun 29, 2007 2:24 pm

Return to javascript tips for July 07

Who is online

Users browsing this forum: No registered users and 1 guest

cron