PDA

View Full Version : Changing embedded iPIX images


Pauliostro
12-11-2001, 08:31 AM
Hi,

Does anyone know if it is possible to have an iPIX on a page and have a new iPIX load into that same location when a link on that page is clicked on. I know this can be done in frames and new windows - but is it possible to do it all in the same window without frames or popup windows?

If any one has an idea or any info it would be greatly appreciated.

Thanks
Pauliostro

scoutt
12-11-2001, 02:11 PM
what is a iPIX?

Pauliostro
12-11-2001, 04:24 PM
An iPIX is a 360 degree panoramic virtual viewing of a space. Eg inside a room or in side a ****pit or something like that. Check out www.ipix.com for a preview.
When its put on a page its in the <embed></embed> tags and im wondering if its possible to change elements/files within those using something like javascript and not frames or popup windows.

Cheers
Pauliostro

Jon Hanlon
12-11-2001, 04:34 PM
Is this like, an ad for iPix or something?
I just went to the iPix site and the rimfire demonstration does just what you want. If it can be done in a new (pop-up) window then it can be done in the main window.

Pauliostro
12-12-2001, 05:25 AM
Great, just the answer im after. Does anyone know of where I could acquire the code from?

Thanks

_mrkite
12-12-2001, 12:42 PM
Try this: wrap the entire HTML string that places the iPix thingy in the page in a <div> container - e.g.,

<!--applet starts here----------------------------- -->
<div id="iPIX"><OBJECT ID="IpixX1" WIDTH=350 HEIGHT=250 CLASSID="CLSID:11260943-421B-11D0-8EAC-0000C07D88CF" CODEBASE="http://www.ipix.com/viewers/ipixx.cab#version=6,2,0,5">
<!-- For MSIE 3,4+ -->
<PARAM NAME="IPXFILENAME" VALUE="http://www.ipix.com/products/images/rio_grande_gorge.ipx">
<!-- For Netscape 3,4 -->
<embed src="http://www.ipix.com/products/images/rio_grande_gorge.ipx" WIDTH="350" HEIGHT="250" BORDER="0" PALETTE="FOREGROUND" type="application/x-ipix" pluginsPage="http://www.ipix.com/cgi-bin/download.cgi"></embed>
</OBJECT></div>
<!--applet ends here------------------------------- -->

Then put the HTML - like the above - for another iPIX item in a JavaScript string:

<script type="text/javascript">

var newiPIX = '<OBJECT ID="IpixX2" WIDTH=350 HEIGHT=250....';

</script>

To load the new object, just set document.getElementById('iPIX').innerHTML = newiPIX. Put it in a function, call it from a link with <a href="#" onclick="function_name();return false;">. Should work in NS6 as well. For NS4 you'd need to use a Layer.

Jon Hanlon
12-12-2001, 05:02 PM
All you need to do is go to the site, click on Rimfire to create the little pop-up. Now Right-Click in the little window and choose View Source. This will open Notepad (probably). Choose File Save As and save the source on your computer.

Note that there are two external JavaScript files:
http://www.rimfiremedia.com/include/rsapi.js and http://www.rimfiremedia.com/include/pwtcom.js
to get these files, just type their names in the Address bar of your browser and choose Download.

Pauliostro
12-15-2001, 11:20 PM
Thanks _mrkite,

Ive gone through the code you supplied me with but im having some small problems. Would you be able to point me in the right direction.

<html>
<head>

<script type="text/javascript">
function change() {
document.getElementById('iPIX').innerHTML = newiPIX;
}

var newiPIX = '<OBJECT ID="IpixX2" WIDTH=350 HEIGHT=250CLASSID="CLSID:11260943-421B-11D0-8EAC-0000C07D88CF"
CODEBASE="http://www.ipix.com/viewers/ipixx.cab#version=6,2,0,5">
<!-- For MSIE 3,4+ -->
<PARAM NAME="IPXFILENAME" VALUE="back.ipx">
<!-- For Netscape 3,4 -->
<embed src="back.ipx" WIDTH="350" HEIGHT="250" BORDER="0" PALETTE="FOREGROUND" type="application/x-ipix" pluginsPage="http://www.ipix.com/cgi-bin/download.cgi"></embed>
</OBJECT>';
</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">
<!--applet starts here----------------------------- -->
<div id="iPIX"><OBJECT ID="IpixX1" WIDTH=350 HEIGHT=250 CLASSID="CLSID:11260943-421B-11D0-8EAC-0000C07D88CF"
CODEBASE="http://www.ipix.com/viewers/ipixx.cab#version=6,2,0,5">
<!-- For MSIE 3,4+ -->
<PARAM NAME="IPXFILENAME" VALUE="front.ipx">
<!-- For Netscape 3,4 -->
<embed src="front.ipx" WIDTH="350" HEIGHT="250" BORDER="0" PALETTE="FOREGROUND"
type="application/x-ipix" pluginsPage="http://www.ipix.com/cgi-bin/download.cgi">
</embed>
</OBJECT></div>
<!--applet ends here------------------------------- -->

<a href="#" onclick="change();return false;">NEW</a>
</body>
</html>

It loads the iPIX fine but the change to the new iPIX doesn't work. I have been testing it in IE5 on a Mac.

Thanks Again
Pauliostro

_mrkite
12-16-2001, 12:13 AM
Pauliostro -

Try this: open the page in your editor, turn off word wrap, an remove all the line feeds from the string newiPIX. Get it all on one line, and be sure there's a space between HEIGHT=250 and CLASSID. Then check it.

Pauliostro
12-16-2001, 10:20 PM
Thanks so much! Works like a charm!!