how to show shadowbox automatically once users enter my page?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

how to show shadowbox automatically once users enter my page?

manhon
how to show shadowbox automatically once users enter my page?
THx a lot if anyone can help me to figure this problem.
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

Wizzud
Use Shadowbox.open() with the DOM element you wish to activate...

window.onload = function(){
  Shadowbox.init();
  Shadowbox.open(document.getElementById('startElement'));
};


< a id='startElement' href='......' rel='shadowbox'>......< /a>
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

ChemoWeb
can we use this method to open a <div> element instead passing through an < a > one?
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

Wizzud
Use Shadowbox.open() with the DOM element you wish to activate...

window.onload = function(){
  Shadowbox.init();
  Shadowbox.open(document.getElementById('startElement'));
};


< a id='startElement' href='#fred' rel='shadowbox;width=400;height=200'>......< /a>

...
...

< div id='fred'>
  < div>
     < p>Welcome!< /p>
     ...
  < /div>
< /div>
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

ChemoWeb
Wizzud wrote:
>
> Use Shadowbox.open() with the DOM element you wish to activate...
>
> window.onload = function(){
>   Shadowbox.init();
>   Shadowbox.open(document.getElementById('startElement'));
> };
>
>
> < a id='startElement' href='#fred'
> rel='shadowbox;width=400;height=200'>......< /a>
>
> ...
> ...
>
> < div id='fred'>
>   < div>
>      < p>Welcome!< /p>
>      ...
>   < /div>
> < /div>
>

Great, it works!!!
Thanks a lot, Wizzud!
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

Anon
I have implemented an onload shadowbox for when people arrive at my homepage, which looks great.  It took a while to work out that the code needed amendig slightly to work (in my case anyway)

<br><script type="text/javascript"> window.onload = function(){ Shadowbox.init(); Shadowbox.open({ player: 'iframe', title: 'Overview', content: 'http://www.XXX.com/introduction.php', }); }; </script>
However, it now loads everytime they end up back on the homepage while looking round the site - how would you set it to only load on their first visit please (as it is slightly annoying once they have got "the message"?

Many thanks

Anon
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

build
The only method would be to use cookies but even that would be unreliable and beyond the scope the this forum subject ... but  what is your server side language?

Also consider the visitor ... the splash may look good to you but i like most users find them a pain and use the dreaded red X.

beers,
build
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

Anon
Thank you - does anyone know how to implement the cookie solution please?

I am using php4, Joomla 1.5.9.  The pop up/shadowbox is to ensure that they get the key messages of the site (not sales - it is effectively a mini-site that walks them through) before entering the main site/getting to the normal navigation.  This is perfect to stop them (as they do now) having to navigate through one site to get to the second and was based on feedback.

Many thanks

Anon
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

build
Reply | Threaded
Open this post in threaded view
|

Re: how to show shadowbox automatically once users enter my page?

Anon
Thank you Build - unfortunately I am still none-the-wiser having read up a little on Php sessions (as I am not a coder, just an amateur!).  What code do I have to put where please so that it only loads on their first visit to the site that session? Does anyone know an easy way to achieve this please?

Many thanks

Anon