1.11M Members

PHP / JavaScript alert problem!

 
0
 

Hey guys i have a little problem!! :confused:

I am trying to prompt a JavaScript alert before the html headers and when this happens i does not style my footer from css.

Heres my code:

if ($queryupdate) { echo "<script>alert('Your password has been updated!')</script>"; } else { echo "<script>alert('Your password has not updated!')</script>"; }

Does any body know how this can be fixed?

Thanks,
Marais

 
0
 

It worked for me.
Try this:

if ($queryupdate) {
    echo "<script type=\"text/javascript\">alert('Your password has been updated!')</script>";
} else {
    echo "<script type=\"text/javascript\">alert('Your password has been updated!')</script>";
}

Check $queryupdate's value.

 
0
 

Fist... do this...

if ($queryupdate) {
    echo "<script type='text/javascript'>alert('Your password has been updated!')</script>";
    } else {
    echo "<script type='text/javascript'>alert('Your password has been updated!')</script>";
    }

And then, maybe, it won't be styled because first run alert and all stop...

 
0
 

thanks, so will this work before the html headers??

And then still style??

Thanks,
Marais

 
0
 

I mean, when alert is prompted, all stop processing until you press ok or what you have to press...

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: