How to automatically load HTML page into shadow box on load

13 messages Options
Embed this post
Permalink
Westfield

How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
I would like an automatic shadowbox loading when my page is loaded. The shadow box should have a html page in it. I can get an image to load but not an html page. Any help would be appreciated


I'm using this

window.onload = function(){

    Shadowbox.init({
        // let's skip the automatic setup because we don't have any
        // properly configured link elements on the page
        skipSetup: true
    });

    // open a welcome message
    Shadowbox.open({
        player:     'html',
        title:      'Program Alert',
        content:    '',
        height:     450,
        width:      450
    });

};

</script>
Westfield

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
sorry what I'm using is

window.onload = function(){

    Shadowbox.init({
        // let's skip the automatic setup because we don't have any
        // properly configured link elements on the page
        skipSetup: true
    });

    // open a welcome message
    Shadowbox.open({
        player:     'html',
        title:      'Program Alert',
        content:    '<url="http://www.microsoft.com">',
        height:     450,
        width:      450
    });

};

</script>
build

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
I can't see a problem.
It may be a comma or something but ...

please provide an online example.

beers,
build
westfield

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
Is the url command correct?
build

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
no i was blind to that.

please provide an online example!

it is so much easier to see a problem
Wizzud

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
In reply to this post by westfield
Just (for example) ...

content : 'http :// www .mydomain .com / page.html'

[no spaces, obviously!]
Combine literacy with curiosity and a whole world of information opens up to you
dirty bird

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
In reply to this post by build
was wondering the same thing. was this ever fixed?
build

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
(This post was updated on )
Please provide an online example of your problem in a new thread.

beers,
build
dirty bird

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
I will shortly, thank you for your reply.
dirty bird

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
got it! sorry to bother.
Andrew

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
How you got it? PLZ!
argon_oliver

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
In reply to this post by Westfield
Gud day guys. im new in this forum and also new to shadowbox script. we have same problems in loading a html file. but i find a simple solution in loading it. your script will not load any object because you dont declare any players. in order to automatically load a file or object you need to declare or open a function that calls the type of file you are calling. example you are calling a html file. then you need to call a player for that html file.

here's the script(i just added a player function and remove the skip setup)

<script>
window.onload = function(){

    Shadowbox.init({
        // let's skip the automatic setup because we don't have any
        // properly configured link elements on the page
        //skipSetup: true
        players:  [ 'html']
    });

    // open a welcome message
    Shadowbox.open({
        player:     'html',
        title:      'Program Alert',
        content:    '<url="http://www.microsoft.com">',
        height:     450,
        width:      450
    });

};

the players:['html'] calls the function for the html objects. then that should work.
hope this script will help.
Wizzud

Re: How to automatically load HTML page into shadow box on load

Reply Threaded More More options
Print post
Permalink
In reply to this post by Andrew
Example (minimal, and assuming the iframe player is configured/loaded):
Shadowbox.open({
    player : 'iframe'
  , content : 'thepage.html'
  });

See also the first example under http://www.shadowbox-js.com/usage.html#advanced
Combine literacy with curiosity and a whole world of information opens up to you