Jump to content

Displaying a specific div from another site - iframe or a different solution?


Recommended Posts

Hey,

 

I'm a real rookie when it come's to web design so I've made only minor adjustments and customizations to ready Wordpress templates.

 

Right now I'd need to find a way to bring content from another website to mine and the "usual" iframe way just won't cut it as it's not responsive and it just doesn't feel wise to play around with iframe's margin and other values. So what would be the right way to do this?

 

For example, if I want the blue rating box from this site https://www.huom.fi/anne-kero ( box: https://jsfiddle.net/vkLwo4z1/ ) to another site, how should I do it? Is there a way to specify the iframe tag to display just this div on all devices?

 

Thanks in advance.

Link to post
Share on other sites

If you don't own the content then you might want to try contacting the owner of it and see if they have an API you can use to get the content. Otherwise you can forget getting it client side becausse it would require cross domain scripting that will be blocked in the browser.

 

If you have enough server side skills you could acquire the page server side and then parse out the content you want. However, if the owner of the content does not wanty to share the content, they may block your access to their site if they detect what they consider inappropriate use of their content.

Link to post
Share on other sites

Hey, thanks for the replies!

 

I've actually acquired an xml file from the webmaster of the external site. It has all the "transfer data" with a few tabs full of properties and values. He of course is too important and professional to explain anything to a newbie so he just basically told me to "code it in", can't blame him though.

 

Cropped screencap

 

So this file supposedly has all the information I need, but I don't even know where to start. I suppose there is a plugin (something like All Import) to import this xml sheet to my database.

 

I suppose I just need to study this plugin and see if it can actually help me out on this matter.

 

Wish I had picked up coding and web design back in school :Pleased:

Link to post
Share on other sites

Just goes to show what you know Ingolme. Actually it is the future! Why is it i can’t load a picture of myself into my profile in the Forum? I was going to use the one Steve Job’s wife had taken of me. It’s the one that sat on top of the piano in their house. I get it, you're telling me i am old!

Link to post
Share on other sites
Wish I had picked up coding and web design back in school

 

 

Well it is never too late to start and you are on a site that has been the starting point for a lot of web developers. If you are in over yout head because you cannot understand the code necessary to do what you want to do then you have several options.

 

  • Spend the time to learn the skills necessary to get the work done by using the training resources on this and other sites. Don't expect others to do all the work for you.
  • Hire a professional to do the work for you
  • Drop what you are trying to do and move on to something else

The person who told you to "code it in" is doing you a favor because you either need to learn on the fly not just for this but for anything else you want to advance in; or you can just depend on others and never have the satisfaction of solving big challenges yourself.

 

As for using that plugin: it might or might not solve the immediate problem. What it will do is help you learn how to do things the wrong way and just make you more dependent on the work of others.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...