Sie sind nicht angemeldet.

1

Donnerstag, 9. April 2009, 03:50

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

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

2

Donnerstag, 9. April 2009, 07:24

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?

3

Donnerstag, 9. April 2009, 14:36

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

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

4

Donnerstag, 9. April 2009, 20:41

Vn2009

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


Quellcode

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

Quellcode

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:

Quellcode

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.

Quellcode

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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Shanti« (9. April 2009, 21:07)


5

Freitag, 10. April 2009, 23:33

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

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

6

Samstag, 11. April 2009, 02:29

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

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

7

Samstag, 11. April 2009, 07:35

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

Quellcode

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)

Quellcode

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");

:)

8

Samstag, 11. April 2009, 17:23

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

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

9

Samstag, 11. April 2009, 19:32

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

Shanti

Fortgeschrittener

Beiträge: 301

Wohnort: Puerto Vallarta

Beruf: Web Developer

  • Nachricht senden

10

Samstag, 11. April 2009, 20:01

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 :)

11

Sonntag, 12. April 2009, 01:41

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

12

Montag, 14. September 2009, 15:34

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*

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

14

Mittwoch, 16. September 2009, 16:32

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

15

Mittwoch, 16. September 2009, 16:55

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

Tuur *thumbsup*

16

Dienstag, 22. September 2009, 12:47

thickbox works fine

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

the html

Quellcode

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

Quellcode

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

17

Donnerstag, 24. September 2009, 12:13

ooo i hope so, gonna check that tomorrow.

thanx Job,

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

Tuur *thumbsup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (24. September 2009, 14:49)


18

Montag, 19. Oktober 2009, 17:25

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

Dienstag, 20. Oktober 2009, 10:17

Hi,

this is the important part in the html:

Quellcode

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

Fortgeschrittener

Beiträge: 145

Wohnort: Wellington, New Zealand

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

  • Nachricht senden

20

Mittwoch, 4. November 2009, 23:41

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?

Ähnliche Themen