This is a discussion on "[SOLVED] How to make the PM pop up box?" within the JavaScript Forum section. This forum, and the thread "[SOLVED] How to make the PM pop up box? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] How to make the PM pop up box?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] How to make the PM pop up box?
I just can't stop thinking about this forum PM Pop-Up message box that indicate you have a Private Message (PM)!
Any idea how to make them Is it a "simple-to-do things"..??? Thanks..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|
|
||||
|
Re: How to make the PM pop up box?
Javascript caused by a server side variable
The server side bit just says to do it, the difficult part is the PM thing itself in JS. This should be moved to JS section
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: How to make the PM pop up box?
Ok then, I'll move this thread to JS Forum!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
OK, can you be a bit more specific about what you want help with.
Are you wondering how to know when to show the popup? Or how to animate it?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
From my experience, I generally know that there is some code for checking if a certain field in my table database is new (when someone PM me, some field will be set to NEW), then the popup box will appear (with the animation)
pseudocode:
So, am I thinking creative enough?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Last edited by Monie; Nov 1st, 2007 at 04:53. |
|
||||
|
Re: How to make the PM pop up box?
yeah, that should work.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
I am having a bit problem with the javascript tho..
I mean how to do the animation things? It's javascript right? Anybody can help me..?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
yes, it's javacript.....
Do you have any code yet?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
Not really. All still a bit blur to me.. but I get the idea, roughly not too sure..
My current idea...: When someone post me a message(saved to myMessage field) and automatically set the myMessageElert field status to 'NEW' there will be a IF Then Else function in my ASP page to check:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
I guess you would have include a server side script which would create a pop-up box when $unreadprivatemessages!=0
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
|
|
|||
|
Re: How to make the PM pop up box?
Thanks for the info, but an example would be much better.
How does the page run the comparison code each time we have a new PM, does it refreshed? I don't think so, right?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
^monie, I don't know much because I am not an official programmer by qualification. Its just out of my curiosity.
About your question, I think logically, one would have to go about this way: 1. In the showthread.php, newthread.php, and index.php, there should be a code that indicates the table prefix and column name in MySQL database for unread private messages. 2. If the no. of unread private messages is not equal to zero, a javascript would be inserted in the page . The JS would contain confirm function and window.open function.
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
|
|
|||
|
Re: How to make the PM pop up box?
Wow that's complicated!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
Well actually it's not quite as complicated as all that.. lol
I don't know how the webforumz one actually works but this is what I would do.... In the head of your page, write with ASP or whatever <script type="text/javascript"> If myMessageElert = 'NEW' and user = session("user") Then // Write to page (not sure how with ASP var showPMpopup = true; Else var showPMpopup = false; End If </script> That would really be all that is needed from the server side (you can of course add more to make the PM popup more detailed, like the title of the PM and how many are new etc... Then for the javascript.... This is very quickly thrown together and probably isn't as foolproof as the WFZ one....
** Rakuli grins cause it was easier than he thought **
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
Hai rakuli, Thanks for the code, just a simple question tho...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
Actually write the literal string 'var showPMpopup = true;' with ASP...
The else write the same javascript variable as false so the literal string 'var showPMpopup = false'
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
Shouldn't that be in javascript code since it is in the <script type="text/javascript">? Just my curious..
If I am correct, I will declare showPMpopup as an ASP variable like this:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
Well, I have no idea what you do with ASP but let's say it was PHP
Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: How to make the PM pop up box?
"echo" means it will be printed/display in the page, am I right? or just a simple line of code..?
Do you mean I must write ASP code in Javascript..? **monie tell himself to stop questioning! you should try them first before throwing any stupid, useless question!! I'll get back to you tomorrow Rakuli. Thanks.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
||||
|
Re: How to make the PM pop up box?
Echo means , write this to the page at this exact location... You shoule write javascript with ASP not vice versa....
eg.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |