|
uCoz Community Archives Locked How to Make an Ajax Window Pop-Up on members first login? |
How to Make an Ajax Window Pop-Up on members first login? |
I want to make an Ajax window to pop-up when a person first logs in. Is it possible? If so, how?
I need it so that it will tell the user that they should be active in the forum and they should read the forum rules. |
Quote (websiteguru) Is it possible? Yes. Quote (websiteguru) If so, how? It might be helpful to read this: http://forum.ucoz.com/forum/38-12032-1 Next time, use the Search feature of this forum. There were lots of problems that were already answered. |
websiteguru, it is possible, but it involves a lot of coding and a certain knowledge of JS on your behalf. That is why we do not provide help with it. Please, use Search. I will also move your thread to Users Communication. You might get some help there.
|
There's no straight-through way of making this possible. Either way, the user will still see the AJAX window. You can hide it from the user for as long as you like by using cookies, provided that the user doesn't clear cookies and / or doesn't change browsers. If I were you I'd wait for the implementation of PHP and do it then.
"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.
![]() ![]() |
As khen said, you can use the following script, http://forum.ucoz.com/forum/38-12032-1
And you can use conditional operators to only show the window when a user is logged in. Although it will pop-up everytime a user refreshes the page. |
I know a cookie would solve the problem with it popping up everytime you reload the page, but I have no knoledge of JavaScript.
|
Quote (websiteguru) I know a cookie would solve the problem with it popping up everytime you reload the page, but I have no knoledge of JavaScript. Code <script type="text/javascript"> function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } </script> Use the above functions to write, read, and delete cookies. How to create a cookie: Example: "Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.
![]() ![]() Post edited by shadowslash - Friday, 2011-02-18, 1:43 AM
|
| |||
| |||
Need help? Contact our support team via
the contact form
or email us at support@ucoz.com.