Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Launch lytebox on page load?

Featured Replies

Hi guys, i'm trying to setup my website: http://www.unleashednights.co.uk so that the lytebox loads on start, stores a cookie and then when they revisit it wont launch.

 

I need the lytebox to show my email mailing list join form, i'm trying to push people to join up!

 

Any help would be awesome!

 

Regards,

Stefan

http://www.prettyklicks.com

  • Author

Right got there, now im trying to implement a cookie to stop it coming up when its already been closed the first time round:

 

It's not working though, keeps coming up anyway!

 

Whats wrong with this?

 

<script type="text/javascript">



$(function() {
	$("#dialog").dialog({
		bgiframe: true,
		modal: true,
		resizable: false,
		autoOpen: true,
		width:200,
		buttons: {
			Ok: function() {
				$(this).dialog('close');
				$.cookie('doneWin', 'closed' { expires: 2 });
			}
		}
	});
});


</script>

<script type="text/javascript">
var doneWin = $.cookie('doneWin');

 if (doneWin == 'closed') {
      $("#dialog").dialog('close');

};
});
</script>

 

Regards,

Stefan

I've not worked much with JS cookies. Might be wrong in saying this but i don't think you can just set a cookie like that with JS, you need expiry times etc and time stamps. I've got something we worked through back in college that should do just the trick. It's on the other computer if this isn't resolved by tomorrow will hook you up. :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.