Jump to content

Pop Up Box


alwaysvaghu

Recommended Posts

Hello freinds,,,,,If u r using yahoo/msn messanger...then when some one gets onlineAt the bottom side one popup will say that this person is now online....I want to do that...I m creating on chatting module...lookin same as yahoo's chat window..like had a option of group chat..in one side online users.....it also adds in the list when user online....but i want to put the popup when somebody comes online.............vaghu....... :)

Link to comment
Share on other sites

hi...Whole Application is created in Html with the help of php and javascript ......i think for creating the pop-up i must use javascript...actually i have put "window.open()" but there is a message coming Popup is blocked from this site...so what should i do

Link to comment
Share on other sites

hi...i have just seen that url..but i have one problem......it is executed when u click on button...i dont want that......i mean i have php code in chat...and it is continuously checking whether any user in online or not...if the code find any online user..it should then show the popup...so u got it now..i think so...how can i automatically run that..without any knid of click....

Link to comment
Share on other sites

JavaScript can do runtime, but only with variables in this case. You have to make sure PHP sends a request for a popup to JavaScript, while JavaScript can't check for online users, and PHP can't show a popup...Can you give us a link to the window opening page? Or an excample of the PHP script you wrote, so we can program or explain a program to do this.. :)

Link to comment
Share on other sites

Hi, Padu :) So Plz Code like that Page is automaticalyy refresh at Some moment and Code of checking Execute Every TimeThat Code is <script type="text/javascript"> function reFresh() { location.reload(true) } window.setInterval("reFresh()",1000); </script>Vijay

Link to comment
Share on other sites

here is kind of code with description...<?php$qry = "Select * from users where user_stat='1'"; //find the users from databse//some code here for checking other parameters..and this will find out two parameters "$flag" and "$diff"........if($flag==1 && $diff==0){ //Here i want to show POPUP}?>/////////////////////////////I Am Doin This but its not workin///if($flag==1 && $diff==0){ //Here i want to show POPUP?><script Language = "avascript"> alert(smthing)...// </script<?php}?>

Link to comment
Share on other sites

This is a one-time only script, no runtime.You can call with JavaScript every second for instance, to a PHP script. Then it would be runtime, sort of. :)Try to make a function, that connects to the php script, after one second. The php script checks for online users, and passes back the results to the JavaScript (like with header("Location: file.js?online=no"). )If somebd do is online, rewrite the JavaScript with php, with an additional function that shows the popup.Is this understandable, or should I give an example?

Link to comment
Share on other sites

This is a one-time only script, no runtime.You can call with JavaScript every second for instance, to a PHP script. Then it would be runtime, sort of. :)Try to make a function, that connects to the php script, after one second. The php script checks for online users, and passes back the results to the JavaScript (like with header("Location: file.js?online=no"). )If somebd do is online, rewrite the JavaScript with php, with an additional function that shows the popup.Is this understandable, or should I give an example?

I have already done that..thanx yaar "Dan the Proof"I m refreshing the page after 2 seconds
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...