MoD-Soap
Posts: 2
Joined: Sat Dec 26, 2009 4:02 pm

Highslide open on page load?

Hi, I need help, I want to open a flash file when someone visit my Homepage, but it dont work!

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Highslide JS</title>


<script type="text/javascript" src="../highslide/highslide-with-html.js"></script>
<link rel="stylesheet" type="text/css" href="../highslide/highslide.css" />

<script type="text/javascript">
hs.addEventListener(window, "load", function() {
   hs.expand(null, {
      src: 'image.jpg'
   });
});
</script>

</head>

<body>
<div>

    <a id="autoload" href="http://realschulewalsrode.de/templates/it_sporty/images/header.jpg" onclick="return hs.expand(this)"></div>
</body>
</html>
Where ist the mistaken?

Bye Soap
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Highslide open on page load?

Hi,

For opening a flash popup on page load you need to do some changes in the addEventListener code: You need to use hs.htmlExpand instead of hs.expand, you need to use src: 'something.swf' instead of src: 'image.jpg' and you need to add objectType: 'swf'.

Code: Select all

hs.addEventListener(window, "load", function() {
	hs.htmlExpand(null, {
		src: 'something.swf', 
		objectType: 'swf', 
		width: 300, 
		objectWidth: 300, 
		objectHeight: 250, 
		maincontentText: 'You need to upgrade your Flash player'
	});
});
See example page: http://www.roadrash.no/hs-support/flash ... immed.html
Last edited by RoadRash on Sun Dec 27, 2009 2:21 pm, edited 1 time in total.
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
MoD-Soap
Posts: 2
Joined: Sat Dec 26, 2009 4:02 pm

Re: Highslide open on page load?

thank you

Return to “Highslide Editor”