Jump to content

iframe not showing sometimes


oli22

Recommended Posts

i am instaling  a complex video tube script' in a subfolder of main site and i made a section of this script appear on main index(root ) folder with an iframe. Recap->main index, my code, my site showing an iframe from subfolder tube script section.

 

This iframe sometimes does not load, its as  if it was not there. Is that due to connection speed?

Is there a way to make sure it always loads?Or this this bad practice and bound to remain unstable?

 

 

 

 

Link to comment
Share on other sites

OK see here is the < iframe>  in the html:

 

...

</div>

<!--END container -->

</div>

<iframe src="http://www.mysite.com/searchEngine/" width="680px" height="205px" scrolling="no" frameborder="0" style="margin-left:10px;">

  <p>Your browser does not support iframes.</p>

</iframe>

<!--START bottomContainer -->

....

 

Sometimes it does not appear

Link to comment
Share on other sites

im not sure if this really works though but, hopefully it helps a little.

 

<script>
function ckframe() {
var framesrc = document.getElementById('frame').src;
var urlsrc = "http://www.mysite.com/searchEngine/";

if (framesrc != urlsrc) {
framesrc = urlsrc;
}
}

setInterval("ckframe()",1000);
</script>
<iframe id="frame" src="http://www.mysite.com/searchEngine/" width="680px" height="205px" scrolling="no" frameborder="0" style="margin-left:10px;">
  <p>Your browser does not support iframes.</p>
</iframe>

Link to comment
Share on other sites

If you have learnt javascript you would know what it does.

 

but still i would tell you how it works.

 

<script>

/* I created a function which would check if the frame src the same to which is your url. else it would change the frame src automatically */
function ckframe() {

// define framesrc = the frame src
var framesrc = document.getElementById('frame').src;

// define the url
var urlsrc = "http://www.mysite.com/searchEngine/";

// here is where it checks.
if (framesrc != urlsrc) {
framesrc = urlsrc;
}
}

// make an interval every second to make sure that the src is correct.
setInterval("ckframe()",1000);
</script>

<iframe id="frame" src="http://www.mysite.com/searchEngine/" width="680px" height="205px" scrolling="no" frameborder="0" style="margin-left:10px;">
  <p>Your browser does not support iframes.</p>
</iframe>

Link to comment
Share on other sites

Iframe is from a cms i intalled in a site subfolder, it cannot be accessed thru my index, so forget about includes

 

The script is written with  .tlp's its actually more complex than a regular cms and for the moment i don't have tech knowledge

to for a better work around.

 

Link to comment
Share on other sites

Actually i am doing the best i can with what i know

Sorry, it can be accessed with links from index to subfolder, but i cannot pull any sections/folders directly from the sub folder to root folder as it will not easily allow it. The script has a scrary amount of folders that interlink...

.tlp :  not quite sure,but script is written in php using .tpl extensions is  for modular architecture in a script , a step up from a regular cms,

kind of like joomla, i also seen .tlp's in phpmelody csm .

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.