You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

1

Thursday, April 9th 2009, 3:50am

call a thickbox from the xml file

is this possible? i can get the thickbox to display using an ' a href' in html and get the box to display but i cannot get it to work from the xml in a pano. tried this and it does not work, i tried many variations and cannot call a thickbox from within a pano.

onclick="javascript:tb_show('test','home.html?keepThis=true&TB_iframe=true&height=500&width=800')"

http://www.virtualnorthland.com/beta/beta.html

upper left hand corner is a test button it calls my thickbox, sort of, it is missing the border and close button but it displays. how can I get the home plugin to load the same thing? here is the html link that works

<a href="home.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=500&width=700&modal=true" title="test" class="thickbox">test</a>

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

2

Thursday, April 9th 2009, 7:24am

this is interesting, and raises the question, we know that Krpano comunicates with Javascript, but is it both ways? i mean can we have a hotspot to call a javascript function on the same page?

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

3

Thursday, April 9th 2009, 2:36pm

know you can call java in some fashion. this link is calling a video from java to run in a window center screen. but i do not want to use this box. i can if i must but id like to call a thickbox. click the movie camera icon.

http://www.virtualnorthland.com/panos/central/

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

4

Thursday, April 9th 2009, 8:41pm

Vn2009

have you tried creating a function and then calling that function?


Source code

1
<plugin name="mechanics" url="../../images/video_icon2.png" align="leftcenter" x="10" y="0" keep="true" scale=".6" zorder="10" onhover="showtext(View a 30 sec video of the Clock Mechanism);" onclick="js(centerwindow(mechanics.html));"/>


as we can see from that xml, he is calling a function in JS.

so maybe create a function that opens the thickbox? and then call it from there

Source code

1
2
3
4
function openthick(url) {
// function to open thickbox 

}


I got no idea if thickbox supports opening from a JS call, but i know Greybox does

so you could use this (hopefully) in your XML:

Source code

1
onclick="js(GB_showCenter('Title', 'filetoopen.html'));


I have never tried it, but if Krpano is able to comunicate with JS then it should work

*smile*

EDIT:

oops stupid me, I see its possible to open thickbox from a JS call.

Source code

1
onclick="js(tb_show('test','home.html?keepThis=true&TB_iframe=true&height=500&width=800'));

This post has been edited 1 times, last edit by "Shanti" (Apr 9th 2009, 9:07pm)


VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Friday, April 10th 2009, 11:33pm

shanti it works! kinda of. i could not even get a box to pop. i was missing a set of (). now i can get the TB to open but there is no data on the inside. did your content display when you tested this?

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

6

Saturday, April 11th 2009, 2:29am

I didn't test it at all.

but your example only opens a new window it does not popup the TB, or is it another page?


I will do a test using Greybox and Thickbox, see if it works and I will let you know :)

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

7

Saturday, April 11th 2009, 7:35am

ok, I tested it.

http://www.vallartarestaurants.com/panoramas/krgm/m.php

click on the very first thumbnail

the problem seems to be the single quotes, try this

Source code

1
2
3
<action name="gbtest">
	js(GB_show(Google,http://www.google.com,500,800));
</action> 


no quotes or single quotes.


in your case (untested by me, since I use greybox)

Source code

1
onclick="js(tb_show(test,home.html?keepThis=true&TB_iframe=true&height=500&width=800));



oh and be sure you have this param added to swfobject

so.addParam("wmode", "opaque");

:)

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

8

Saturday, April 11th 2009, 5:23pm

Shanti! many thank yous. that works perfectly. would you be willing to check the test link in the upper left hand corner? i opens the window but i do not get the close button i cant figure out why.

http://www.virtualnorthland.com/beta/beta.html

here is the link i used
<a href="home.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=500&width=700&modal=true" title="test" class="thickbox">test</a>

i cant tell if it is reading the css but i think it is.

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

9

Saturday, April 11th 2009, 7:32pm

I've tried your Beta but it seems low on the fps side and when clicking the spot It takes some time before the info comes. running on a q6600 with 6GB - Mozilla Firefox - Windows 7
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

10

Saturday, April 11th 2009, 8:01pm

I think its the "modal=true" part, never used Thickbox before, but I saw the examples and the nodal windows didn't had the close button :)

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

11

Sunday, April 12th 2009, 1:41am

yes it was the modal=true. i removed that and it works correctly now. i need to learn more java. i bought a java/ajax book this weekend. thank you again.

Tuur

Sage

Posts: 3,154

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

12

Monday, September 14th 2009, 3:34pm

mmmm

i have this

js(tb_show(window name,http://www.virtualtuur.com/test/Rogierenelaine/index.html?keepThis=true&TB_iframe=true&height=450&width=600));

but the part where you can close the thickbox doesn't show on pc ...on mac it does..

Anybody now how to fix that??

Thanx

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

Posts: 3,154

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

13

Wednesday, September 16th 2009, 12:48pm

no body ???

Tuur
*thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,336

Location: Duluth MN

  • Send private message

14

Wednesday, September 16th 2009, 4:32pm

wish i could help more tuur. your code it the exact same thing i am using. no idea why it will not provide the close button. try posting in the help forums at the thickbox website i think they have them.

Tuur

Sage

Posts: 3,154

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

15

Wednesday, September 16th 2009, 4:55pm

shouldn't there be installed something like an extra program??

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

16

Tuesday, September 22nd 2009, 12:47pm

thickbox works fine

http://www.visionrhd.com/site/inter/suite.html

the html

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head>
	<title>Suite Océanie Hôtel 314 Cannes</title>
    <script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="thickbox.js"></script>
<style type="text/css" media="all">@import "thickbox.css";</style>
</head>
<style>
body{ font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#FFFFFF; background-color:#000000; margin:0; padding:0; }
* html, * html body{ overflow: hidden; }
a{ color:#AAAAAA; text-decoration:underline; }
a:hover{ color:#FFFFFF; text-decoration:underline; }
</style>
<body>

<div id="krpanoDIV">
	<noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
</div>

<script type="text/javascript" src="../../pano/swfobject/swfobject.js"></script>
<script type="text/javascript" src="../../pano/swfobject/swfkrpanomousewheel.js"></script>

<script type="text/javascript">
// <![CDATA[
	if (typeof(deconcept) !== 'undefined')
	{
		if (deconcept.SWFObjectUtil.getPlayerVersion().major >= 6)
		{
			var so = new SWFObject("suite.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
			
			so.addParam("allowFullScreen","true");
			so.addParam("wmode","opaque");
			so.useExpressInstall("../../pano/swfobject/expressinstall.swf");
			so.setAttribute("xiRedirectUrl", window.location);
			so.addVariable("pano", "");
			
			if ( so.write("krpanoDIV") ) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
		}
		else
		{
			document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/"  target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
		}
	}
	else
	{
		document.getElementById("krpanoDIV").innerHTML = '<table width="640" height="480"><tr valign="middle"><td><center>ERROR:<br><br><b>./swfobject/swfobject.js</b> not found<br><br><br><br><br></center></td></tr></table>';
	}
// ]]>
</script>

</body>
</html>


the xml

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
...........
<plugin name="load1" url="../../pano/plugins/textfield.swf" children="false" keep="true"
	        css="p{color:#25a4be; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0x6a397e" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0x935990" visible="true" scale="1"  			            zorder="3"
	        html="[p]Page Web[/p]"
			blendmode="normal" 
	        align="bottom" x="150" y="80" width="90" height="20" 
	        alpha="0.85"
			onclick="js(tb_show(VisionRhd Agence d'Imagerie Virtuelle Interactive,http://www.visionrhd.com?keepThis=true&TB_iframe=true&height=700&width=1000));"
			
			onhover="showtext(Ouvrir un site internet dans une fenêtre);"
			onout=""
	        />	
	        
	<plugin name="load2" url="../../pano/plugins/textfield.swf" children="false" keep="true"
	        css="p{color:#25a4be; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0x6a397e" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0x935990" visible="true" scale="1"  			            zorder="3"
	        html="[p]PDF[/p]"
			blendmode="normal" 
	        align="bottom" x="50" y="80" width="90" height="20" 
	        alpha="0.85"
			onclick="js(tb_show(Télécharger le document,314HOTEL.pdf?keepThis=true&TB_iframe=true&height=650&width=950));"
			
			onhover="showtext(Ouvrir et télécharger un PDF dans une fenêtre);"
			onout=""
	        />
	        
	<plugin name="load3" url="../../pano/plugins/textfield.swf" children="false" keep="true"
	        css="p{color:#25a4be; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0x6a397e" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0x935990" visible="true" scale="1"  			            zorder="3"
	        html="[p]Pano[/p]"
			blendmode="normal" 
	        align="bottom" x="-50" y="80" width="90" height="20" 
	        alpha="0.85"
			onclick="js(tb_show(Visite virtuelle de l'Hotel 314 Cannes,http://www.visionrhd.com/314/314.html?keepThis=true&TB_iframe=true&height=650&width=950));"
			
			onhover="showtext(Ouvrir une visite virtuelle dans une fenêtre);"
			onout=""
	        />
	<plugin name="load4" url="../../pano/plugins/textfield.swf" children="false" keep="true"
	        css="p{color:#25a4be; font-family:Arial; font-weight:bold; font-size:13; margin-left:5; margin-right:5; text-align:center; }" backgroundcolor="0x6a397e" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0x935990" visible="true" scale="1"  			            zorder="3"
	        html="[p]Photo[/p]"
			blendmode="normal" 
	        align="bottom" x="-150" y="80" width="90" height="20" 
	        alpha="0.85"
			onclick="js(tb_show(Réception de l'Hotel 314 cannes(06),preview.jpg?keepThis=true&TB_iframe=true&height=650&width=950));"
			
			onhover="showtext(Ouvrir une photo dans une fenêtre);"
			onout=""
	        />
..............

Tuur

Sage

Posts: 3,154

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

17

Thursday, September 24th 2009, 12:13pm

ooo i hope so, gonna check that tomorrow.

thanx Job,

(edit: wowwwwww job that's a nice tour!!! very nice!)

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Sep 24th 2009, 2:49pm)


18

Monday, October 19th 2009, 5:25pm

hello!

i don't understand how to make it. I put xml on my xml and i have buttons on the panorama. Where I must put this html code? thanks!

19

Tuesday, October 20th 2009, 10:17am

Hi,

this is the important part in the html:

Source code

1
so.addParam("wmode","opaque");


without this setting a html element can't overlap the flash element (normally, but this depends also on the browser),

best regards,
Klaus

viewinz

Intermediate

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

20

Wednesday, November 4th 2009, 11:41pm

external page

I've been trying to use this to open an external site in a thickbox iframe. I can get the thickbox to work (although it does crash firefox) but I can't get an external site in there.

I had a look around the internet and found thisdescription of a solution

But I'm not sure how to implement it. I suppose in a plug-in.. would that work?