Im not sure if this should be in the JS forum or PHP really, cuz its both, but anyways...
I have this RSVP form found here
chugger.homeip.net/myscreen1.jpg
The form itself is called by this command <?php include('rsvp/web2mail.php'); ?>, however the text above it, is just in my rsvp.php file.
Now when I submit the form, it looks like this
chugger.homeip.net/myscreen2.jpg
The text is still above it...and I dont want it there. Its my thankyou page, and doesnt need to be there. HOwever since the form is called via PHP, then so is the thankyou page...right inside my body contents.
So Im guessing I need to somehow HIDE that text maybe. So I tried this and no luck ...
My Head Section
<script language="javascript">
<!-- Hide from older browsers
function hideAll() {
rsvp_intro.style.display='none';
}
// -->
</script>
The body text contents
<div id="rsvp_intro">
If you've received an invitation in the mail, you may choose to submit us your
<b>rsvp</b> online rather then mailing it back to us. This is for the ease and comfortability
of ours guests who like to do things online. Thanks!</div>
and of course the thankyou.php code but only pay attention to the first few lines with the javascript call
<?
if($sent){
echo "
<script language='javascript'>
<!-- Hide from older browsers
hideAll();
/ -->
</script>
";
?>
<div align="center" style="color: #404040; font-size: 13px"><u>Thank you <? echo $name; ?>, your RSVP has been received!</u><br><br>
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" width="450">
<tr>
<td width="132" height="25" id="thankyou_title">Your Attendance:</td>
<td width="225" height="25" id="thankyou_body"> <? echo $attend; ?> </td>
</tr>
<tr>
<td width="132" height="25" id="thankyou_title">Number Of People:</td>
<td width="225" height="25" id="thankyou_body"> <? echo $numberattend; ?> </td>
</tr>
<tr>
<td width="132" height="25" id="thankyou_title">Your message:</td>
<td width="225" height="25"> </td>
</tr>
</table>
</center>
<table border="0" cellpadding="2" cellspacing="0" width="450">
<tr>
<td width="450" id="thankyou_body"><? echo nl2br($message); ?> </td>
</tr>
</table><br><br>
<table border="0" cellpadding="2" cellspacing="0" width="450">
<tr>
<td width="450">
<? if ($attend == "Will Be Attending") {
echo "<img src='../graphics/rsvp_alert.gif'> <font style='color: #926BB8; font-size: 12px;'>It looks as though you <b>will</b> be attending our wedding. We're so happy that your coming!.</font>";
}
else if ($attend == "Will Not Be Attending") {
echo "<img src='../graphics/rsvp_alert.gif'> <font style='color: #926BB8; font-size: 12px;'>It looks as though you <b>won't</b> be attending our wedding. We're sorry to hear that.</font>";
} ?>
</td>
</tr>
</table>
<br><br>
<?
if($show_ip == "yes"){
echo "<small>We have captured your IP (<I>$ip</I>) for security reasons</small>";
}
}
else{
print "$name, we could not send your message at this time, please try again later";
}
?>
</div>