Forum Moderators: open

Message Too Old, No Replies

iFrame problem in browser.

         

Alfasys

1:36 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Hi there,
I do have a problem with the iFrame command. I do use a script I found on the javascripts website to open pages in a new page embedded in a table using the iFrame command.
This is the script I use :

------------------------------------------------------------
This goes in the HEAD section

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function writeLayer(text) {
document.frames['myFrame'].location.href = text;
document.addrForm.location.value = text;
}
function setLayer(text) {
if (text.indexOf("http://",0) <= 0)
text = "http://" +text;
document.frames['myFrame'].location.href = text;
document.addrForm.location.value = text;
}
// End -->
</script>

This goes in the BODY section

<iframe src="x.htm" name="myFrame" id="myFrame" width="98%" height="98%" scrolling="yes" frameborder="0"></iframe>
------------------------------------------------------------

Now, in my browsers IE6.0, Netscape 7.0 and Opera 6.05 it works just fine, I can scroll up and down within the frame defined by the iFrame command. Some visitors told me that they cannot scroll in this frame.

An exaple webpage e.g.: <sorry, no personal links>

Can you please give me some advise?
Since I'm not a java programmer it's not that easy to find the problem. I think it's a combination of old browsers with a missing piece of code in the java scripts.

Thank you.

BTW, great forum.

[edited by: tedster at 2:06 pm (utc) on June 17, 2003]

tedster

7:45 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alfasys, welcome to WebmasterWorld.

I can't quite understand what you are trying to do here, but I gather your page is working the way you want for most people.

The HTML code you gave us never calls on the JavaScript functions that your script defined. So there's no connection between the two pieces of code.

The HTML is correct for creating scrollbars on an iframe. If someone isn't seeing scrollbars, but they ARE seeing at least some of the iframe content, then something's very odd. Old browsers, the ones that don't support iframes, they would see nothing at all. No content, no space, nada.

And just as an aside, JavascScript and Java are two different technologies. Confusing, isn't it. Don't blame me, blame Netscape who named Javascript. They picked the name knowing that Java already existed. And by doin that, they generated a confusion that may never go away.

Alfasys

7:31 am on Jun 18, 2003 (gmt 0)

10+ Year Member



Hi Tedster,

I know it's very odd, but it's getting even stranger ... First I let out the code in de HEAD section. The problem was as descibed before. Since I placed yesterday the first part of the script (the one in the HEAD section) more people can navigate and scroll within the iFrame formed window. I don't understand it anymore. People who still have problems are those in larger companies, probably they have restrictions set by their network manager. Is there maybe a work around or can I use certain code or tags to solve this problem? Thank you for the quick respons.

Karl