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.

loki

Beginner

  • "loki" started this thread

Posts: 47

Location: Berlin

  • Send private message

1

Tuesday, October 26th 2021, 7:27pm

iframe in data tag

Hi all,

I want to open iframes from within layers html data.

The code below works, but I think it's messy. May someone give me a hand please?

Once I remove the empty <a> tags, "Link Text" looses onclick function and hover effect and I can't click it anymore *confused*

Source code

1
2
3
4
5
6
7
8
9
<data name="textbox">
    <div>
        <a></a>
        <span onclick="document.getElementById('krpanoSWFObject').
        call('popup(iframe, https://www.url.de/, -400, -200, true);');">
            Link Text
        </span>
    </div>
</data>


How may I fix this?

Thanks and best regards,
Max

This post has been edited 1 times, last edit by "loki" (Oct 26th 2021, 7:39pm)


Tuur

Sage

Posts: 3,535

Location: Netherlands

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

  • Send private message

2

Wednesday, October 27th 2021, 11:08am

Hi,

do you mean like:

Source code

1
2
3
4
	<data name="html_bla">	   
		hello from Tuur[br]
		Click [a href="event:popup('iframe', 'https://krpano.com/forum/', 800, 600, true);" target="_self"]me[/a]
	</data>


?

Hope it helps,
Tuur *thumbsup*

loki

Beginner

  • "loki" started this thread

Posts: 47

Location: Berlin

  • Send private message

3

Wednesday, October 27th 2021, 11:14am

Ah, thanks. Will try this soon!

Is there any way to integrate krp device dependent values for height and width in this language?

Tuur

Sage

Posts: 3,535

Location: Netherlands

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

  • Send private message

4

Wednesday, October 27th 2021, 11:44am

Hi,

depends a bit on your exact needs i think.
maybe try like:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
	<popsize 
		  width.mobile="200"
		  height.mobile="100"
		  width.desktop="800"
		  height.desktop="600"
	/> 
	
	<data name="html_bla" >
		<![CDATA[
		hello from Tuur[br]
		Click [a href="event:popup('iframe', 'https://krpano.com/forum/', calc(popsize.width), calc(popsize.height), true);" target="_self"]me[/a]
]]>
	</data>


Hope it helps,
Tuur *thumbsup*

5

Wednesday, October 27th 2021, 12:52pm

Hi,

set the interactivecontent setting to true:
https://krpano.com/plugins/textfield/#interactivecontent

Best regards,
Klaus

Tuur

Sage

Posts: 3,535

Location: Netherlands

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

  • Send private message

loki

Beginner

  • "loki" started this thread

Posts: 47

Location: Berlin

  • Send private message

7

Wednesday, October 27th 2021, 9:37pm

Thanks Tuur, it works like a charm on chrome/firefox, even without setting the interactive status. Shall do it anyway, probably for more device compatibility?