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

Recommended Answers

All 4 Replies

Member Avatar for nevvermind

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.

Member Avatar for P0lT10n

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...

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

And then still style??

Thanks,
Marais

Member Avatar for P0lT10n

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.