Jump to content

Recommended Posts

No, as in, nobody can help you. Why?  Because you've posted a vague, grammatically incorrect question, and have supplied no code.  I suspect that English probably isn't your first language, so I don't necessarily fault you for that.  But you need to try a bit harder to explain your situation and post some code.
Link to comment
https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155675
Share on other sites

i am so sorry. yes, english is not my first language.

Let me try this again, i am doing a "window alart prompt" on my webpage and i wanted the webpage information to display first rather then the "prompt message" but the "prompt message" came out first instead which cause my webpage to go blank. i tried to put the "prompt message coding" at near the end.

Like this:
</body>
</html>
<?php echo "<script type=\"text/javascript\">
window.alert('Contact The Management Office')
</script>";
?>

But it show me the same thing...
Link to comment
https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155682
Share on other sites

[quote author=ted_chou12 link=topic=121476.msg499642#msg499642 date=1168248918]
so you want your user to be able to see the page AFTER they clicked the alert box?
[/quote]

no, not really. i want to user to see the page and the alert box together at the same time.
I do not want the alert box came out first the page goes "blank" only after the user click the alert box the web is displayed and this is what happen to me.
Link to comment
https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155690
Share on other sites

well your browser reads top to bottom, left to right, so it displays your javascript before your webpage, because you have your javascript before your webpage. 

you can:

a) Move the javascript down to the bottom of the page, after the rest of your content
b) leave it at the top but wrap it in a function and then call the function down at the bottom, after your content
c)  include the js alert box script inside an onload attribute in your body tag like so:
[code]
<body onLoad="javascript:alert('Contact The Management Office')">
[/code]

p.s.- moving to javascript forum.
Link to comment
https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155968
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.