hi,
i want to alert (javascript dialog) after user clicks the submit button, then process it with php and then show the alert after the body has reloaded (same body after post, just calling the same page.
the easy thing to be done, but i'm going mad with it, is to show an alert saying 'blank' if nothing was posted (the input is empty) or saying 'not blank' if something was written in it.
cant' get it to work with firefox. the alert is just showing a dialog with no text, and in the place where the text should be, there's a 'hole' (transparent) through which i can see the underneath web.
please help me before i get completely mad!!!
i've tryed lots of things, i need this structure as it is.
i've tryed an automatic alert, which also fails.
tryed syntax change, add language="javascript"
, double and simple quotes, html strict and transitional, etc etc...
must be something so easy i'm missing it!!!
thanks for helping me!
here is the code:
<?
if ($_POST)
{
if (empty($_POST['testabc'])) $msg='<script type="text/javascript">alert("BLANK");</script>';
else $msg='<script type="text/javascript">alert("NOT BLANK");</script>';
}
?>
<html><head></head><body>
<table>
<tr>
<td>
<form id="finfo" method=POST>
<input type="text" name="testabc">
<input type="submit" value="info">
</form>
</td>
</tr>
</table>
<script type="text/javascript">alert("auto");</script>
<? echo $msg; ?>
</body></html>
thanks for your time helping!
take care
g