• Page 1 of 1
  • 1
uCoz Community » Archives » Locked » POP UP
POP UP
MysticDragon
Posts: 108
Reputation: 0

Message # 1 | 11:44 AM
Sorry if i posted this in the wrong section.
but can i make a message to pop up whenever anyone visits my website if they are not registered!

CoffeeCone
Posts: 687
Reputation: 41

Message # 2 | 11:54 AM
Quote (MysticDragon)
Sorry if i posted this in the wrong section.
but can i make a message to pop up whenever anyone visits my website if they are not registered!

Yep, you can put the code below anywhere on your site that you wish the alert to appear.
Quote
<?if(!$USER_LOGGED_IN$)?>
<script>
alert('You are not registered. Register now or prepare to meet your doom.');
</script>
<?endif?>

Note that the above code is just an example, the real key is within the <?if(!$USER_LOGGED_IN$)?> and <?endif?> tags. You should place anything you want to show in between those codes. I just included a simple alert() message box to demonstrate how to use those conditional operators.

To know more about conditional operators go to this thread: http://forum.ucoz.com/forum/37-471-1


"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.


Post edited by shadowslash - Sunday, 2011-01-16, 11:56 AM
MysticDragon
Posts: 108
Reputation: 0

Message # 3 | 1:56 PM
helped but looks irritating
I wanted it the way tips appear to admin when they login

CoffeeCone
Posts: 687
Reputation: 41

Message # 4 | 3:48 PM
Quote (MysticDragon)
helped but looks irritating
I wanted it the way tips appear to admin when they login

Yep, it indeed has a tendency to be annnoying... Which is why, you need AJAX Window alerts see the example below:

Code
<?if(!$USER_LOGGED_IN$)?>
<script>
new _uWnd.alert('Content goes here','Title',{w:500,h:100,tm:3000});
</script>
<?endif?>

"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.


MysticDragon
Posts: 108
Reputation: 0

Message # 5 | 8:07 AM
Quote (shadowslash)
<?if(!$USER_LOGGED_IN$)?>
<script>
new _uWnd.alert('Content goes here','Title',{w:500,h:100,tm:3000});
</script>
<?endif?>

Can you please tell me where I should copy this code?

Post edited by MysticDragon - Saturday, 2011-01-22, 8:07 AM
CoffeeCone
Posts: 687
Reputation: 41

Message # 6 | 8:10 AM
Quote (MysticDragon)
Can you please tell me where I should copy this code?

Same as the previous code...

"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.


MysticDragon
Posts: 108
Reputation: 0

Message # 7 | 8:49 AM
Thanks it helped a lot
Also check out my website and tell me how it is.

CoffeeCone
Posts: 687
Reputation: 41

Message # 8 | 9:02 AM
On my code, you can change 3000 to how long you want the pop-up to stay. 3000 = 3 seconds so 5.5 seconds is 5500
"Friends don't let friends use Internet Explorer 6." - Microsoft || Join the cause. Help your friends.


uCoz Community » Archives » Locked » POP UP
  • Page 1 of 1
  • 1
Search: