HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


embedding linked content in iFrame

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#88693 (In Topic #17958)
Avatar

Fan in training

cannot get it to work for certain links

Hi all - I have successfully made very simple linked pages work in an iFrame as per instructions in the Integration tutorial.

However - certain links are not and it is making me wonder if the way the portal code is handling the is causing it ?

I say this, because the <embedded> page and or link work perfectly directly in the browser, but not within ocPortal.

here is the .htm file which is saved in site/pages/html_custom/EN

Code


<iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_07.html"
width="640" height="500" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px;
border-color:#333; background:#FFF; border-style:solid;">


in Edit Menu: site it shows up as expected as;
HTML: :det_watertemp

and i can select it.

however, whether I go this route, or directly embed the code in a ComCode page using ,
I get the same result (in the live iFrame or in preview);

Code


Not Found
The requested URL /ftppub/water_quality/tempstrings/DET_S1_2012_07.html/ was not found on this server.
Apache/1.3.34 Server at www.nwd-wc.usace.army.mil Port 80


however, this direct link when pasted into a browser, or browsing to the above .htm file works perfectly.

Does anyone have any idea what might be breaking when the link gets passed, or what I am doing wrong?

This works for me onLY if the content I am linking to lives on MY server (not remote) ????

Thanks so much for any help !
Back to the top
 
Posted
Rating:
#88702
Avatar

bbaley said

Hi all - I have successfully made very simple linked pages work in an iFrame as per instructions in the Integration tutorial.

However - certain links are not and it is making me wonder if the way the portal code is handling the is causing it ?

I say this, because the <embedded> page and or link work perfectly directly in the browser, but not within ocPortal.

here is the .htm file which is saved in site/pages/html_custom/EN

Code


<iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_07.html"
width="640" height="500" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px;
border-color:#333; background:#FFF; border-style:solid;">


in Edit Menu: site it shows up as expected as;
HTML: :det_watertemp

and i can select it.

however, whether I go this route, or directly embed the code in a ComCode page using ,
I get the same result (in the live iFrame or in preview);

Code


Not Found
The requested URL /ftppub/water_quality/tempstrings/DET_S1_2012_07.html/ was not found on this server.
Apache/1.3.34 Server at www.nwd-wc.usace.army.mil Port 80


however, this direct link when pasted into a browser, or browsing to the above .htm file works perfectly.

Does anyone have any idea what might be breaking when the link gets passed, or what I am doing wrong?

This works for me onLY if the content I am linking to lives on MY server (not remote) ????

Thanks so much for any help !
I had a shot at this and it worked for me. I just pasted your code into a file, pages/html_custom/EN/test.htm and called up http://baseurl/index.php?page=test and it showed okay. I also tried in a Comcode page and it worked.

I'd look at the HTML ocPortal generates to see if it corresponds to your own or it is tampered with by ocPortal somehow, but all I can is it worked for me.

It looks like you have <iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_07.html/" instead of <iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_07.html" coming out, but other than a typo I don't know how that'd happen.

Did you make a typo, or have you spotted from an inconsistency between what HTML ocPortal made, and what you put in the page?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#88715
Avatar

Fan in training

If I put it in a
it apparently works for me too....
Back to the top
 
Posted
Rating:
#88716
Avatar

Community saint

This works for me onLY if the content I am linking to lives on MY server (not remote) ????
Shot in the dark ….

Is this a cross-domain problem in an <iframe>?

 O_o

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#88717
Avatar

Fan in training

However,
Since I can only get it to work in a {box} element, and I cannot figure out how to align multiple {box}s horizontally I am still trying to figure out how to accomplish my goal.

I am basically trying to get multiple iFrame contents horizontally

but this produces some weird artifacts
I'd like to not even use the dang iFrame at all...

In this particular case - it is content like the example given, and,or widgets from weatherunderground, , small google map, etc.

basically, I want to do the following;

{content1} {content 2} {content 3}

not bl ocks, in the page center block <main content>
Back to the top
 
Posted
Rating:
#88718
Avatar

Fan in training

Fletch said

This works for me onLY if the content I am linking to lives on MY server (not remote) ????
Shot in the dark ….

Is this a cross-domain problem in an <iframe>?

 O_o

interesting…. maybe ? not sure how to prove that because I can't move the source content
Back to the top
 
Posted
Rating:
#88721
Avatar

Fan in training

also,
oddly enough, when I am editing some of these iFrame contents,
When I hit "preview" it displays perfectly -
but when I hit Save -
one of them magically disappears ?
not just for admin but public user too....

WEIRD
Back to the top
 
Posted
Rating:
#88725
Avatar

Community saint

So are you after something roughly like this?



The "Not Found" error was because of the additional "/" in the URL as Chris pointed out.

The reason things disappear is probably because you are missing the </iframe>. That causes all sorts of havoc.

And the reason you can't put boxes side by side is because they are not designed to do that.

Here is the code I used:

Code

[html]
<div style="overflow:hidden;width 100%;">

<div class="lightborder" style="float:left;width:33%;">
   <div style="height: auto; width: 100%;">
      
         <h3 class="standardbox_title_light">test3</h3>
      
      <div class="medborder_box">
         
         <div class="standardbox_main_classic"><div class="float_surrounder">

<iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_07.html"
width="640" height="500" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px;
border-color:#333; background:#FFF; border-style:solid;"></iframe>

         </div></div>
         
      </div>
   </div>
</div>

<div class="lightborder" style="float:left;width:33%;">
   <div style="height: auto; width: 100%;">
      
         <h3 class="standardbox_title_light">test2</h3>
      
      <div class="medborder_box">
         
         <div class="standardbox_main_classic"><div class="float_surrounder">

<iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_06.html"
width="640" height="500" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px;
border-color:#333; background:#FFF; border-style:solid;"></iframe>

         </div></div>
         
      </div>
   </div>
</div>

<div class="lightborder" style="float:left;width:33%;">
   <div style="height: auto; width: 100%;">
      
         <h3 class="standardbox_title_light">test1</h3>
      
      <div class="medborder_box">
         
         <div class="standardbox_main_classic"><div class="float_surrounder">

<iframe src="http://www.nwd-wc.usace.army.mil/ftppub/water_quality/tempstrings/DET_S1_2012_05.html"
width="640" height="500" marginwidth="0" marginheight="0" frameborder="no" scrolling="yes" style="border-width:2px;
border-color:#333; background:#FFF; border-style:solid;"></iframe>

         </div></div>
         
      </div>
   </div>
</div>

</div>
[/html]



Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#88727
Avatar

If the WYSIWYG is not off already, try turning it off.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: