teongkia Posted January 8, 2007 Share Posted January 8, 2007 Hi I'm currently adding pop-up in my webpage. What I wanted to do is to see the pop up n page together when i go into the page. What I currently have is the pop up came out first and after I clicked on the ok button only able to see the page. Anyone can help? Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/ Share on other sites More sharing options...
.josh Posted January 8, 2007 Share Posted January 8, 2007 no. Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155652 Share on other sites More sharing options...
teongkia Posted January 8, 2007 Author Share Posted January 8, 2007 no means? Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155672 Share on other sites More sharing options...
.josh Posted January 8, 2007 Share Posted January 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155675 Share on other sites More sharing options...
teongkia Posted January 8, 2007 Author Share Posted January 8, 2007 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... Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155682 Share on other sites More sharing options...
ted_chou12 Posted January 8, 2007 Share Posted January 8, 2007 so you want your user to be able to see the page AFTER they clicked the alert box? Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155685 Share on other sites More sharing options...
teongkia Posted January 8, 2007 Author Share Posted January 8, 2007 [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. Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155690 Share on other sites More sharing options...
.josh Posted January 8, 2007 Share Posted January 8, 2007 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 contentb) leave it at the top but wrap it in a function and then call the function down at the bottom, after your contentc) 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. Quote Link to comment https://forums.phpfreaks.com/topic/33308-pop-up-problem/#findComment-155968 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.