Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 19:07

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 4. Oct 2014, 15:08 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hello
I want to add a class to the body of the parent site thats loaded in my Iframe. In the plugindescrition of crossdomain section there is written something about the option additional_js_iframe. But how does this work?

Regards,

Mike


Top
 Profile  
 
PostPosted: 5. Oct 2014, 01:05 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I don't understand your setup: "body of the parent site thats loaded in my Iframe"

The parent is the site where the iframe is. But you mean the page that is inside the iframe?

In additional_js_iframe you can load additional Javscript where you simply use:
var additional_js_iframe = "jQuery('body').addClass(newClass);"

This has to be added before you include the ai_external.js script.
Best, Michael


Top
 Profile  
 
PostPosted: 6. Oct 2014, 11:46 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hi Michael,

Thanks for your quick reply,

My apologies about my description of my question but some people use the term for parent the website that is loaded in the Iframe but this is exactly what I was looking for.

The only thing is I have to use this script to make it work

document.getElementsByTagName('body')[0].className+=' js'

What I stil wonder,
I can put only one script on the dashboard of our content supplier that's loaded in the iframe. But I need to add a class to the body depending on the url I'm using for the Iframe. Is this possible somehow?

Example:

Url 1: <iframe src="external-domain.nl/campings">.. body class = campings
Url 1: <iframe src="external-domain.nl/somethingelse">.. body class = search

Regards,

Mike


Top
 Profile  
 
PostPosted: 6. Oct 2014, 12:05 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You than have to do some parsing of the url. But this should not be a big problem.

Best, Michael


Top
 Profile  
 
PostPosted: 10. Oct 2014, 14:16 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hi Michael,

I have onther question regarding your iframe pro plugin...
I tried to do some parsing of the url but I noticed that the url is changed by the childpage (is an webapplication) I'm loading in the iframe so parsing by url is no option.
Is there a way to parse the id/class of iframe through the iframe and give the body on the childpage a class or id?

The height option works fine BTW. :)

Regards and thanks again

Mike


Top
 Profile  
 
PostPosted: 10. Oct 2014, 14:29 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Check
pass_id_by_url

there you can pass the current iframe id to the iframe. I use this to automatially detect the correct callback id.
And you can use this for your purpose as well.

Best,
Michael


Top
 Profile  
 
PostPosted: 10. Oct 2014, 15:16 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hi,

The respons is from the application in the Iframe: Configuration error: The id cannot be found in the url at the configured parameter
Im sending allready parameters to access the application (http://aanbod.waverunner.nl/start.aspx?layout=2&u=[userid])

Do you have any other ideas?

greetings

Mike


Top
 Profile  
 
PostPosted: 10. Oct 2014, 15:34 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You have to configure the whole thing. If you use u you also have to set this before the script that this id is used.

See example 27
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/resize-on-element-resize

but you can always simply attach an id to the src and parse this.

Best,
Michael


Top
 Profile  
 
PostPosted: 10. Oct 2014, 16:56 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hi,

The Iframe application is changing the url from this
http://aanbod.waverunner.nl/start.aspx?layout=2&u=[userid])

in to something like this
http://b2c.waverunner.nl/%28S%28wts2021nk5korfscjraoi445%29%29/Frontends/Aanbod/Default/NL/Step1.aspx?Init

So there is no way to read the original url. So I hoped there was anotherway to do so..

Thanks for the update..

Mike


Top
 Profile  
 
PostPosted: 10. Oct 2014, 17:23 
Offline

Joined: 4. Oct 2014, 15:03
Posts: 6
Hi Michael,

I solved it... So simple...

This will do the job!
document.body.className = window.name;

Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy