468,780 Members | 2,337 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,780 developers. It's quick & easy.

iframe probelm in Firefox 1.5

I am the author of easyajax.sourceforge.net, and I have a problem on
Firefox 1.5, I post the problem here and hopes somebody help me.

The test page can be:
http://easyajax.sourceforge.net/demo/overview.html

The page works well in Firefox 1.0.* and IE 6.0, and Opera 8.5, but it
doesnt work on Firefox 1.5, the first time you open the page, it works
well, but when you refresh the page(such as CTRL-R), the page will
displayed in bad way.

When debug the code( It is difficult to debug without a working
debugger), i found that it was occursed at the following code:

var iframe = document.createElement("iframe");
iframe.src = this.url;
iframe.style.height = "0px"; iframe.style.width="0px";
//iframe.height = -1; iframe.width = -1;
// iframe.style.display = "none"; // not works in opera
this.element.insertBefore(iframe, null);

the iframe is hope to load the url normally, but in Firefox1.5(Refresh
mode), it load another url instead, not the given url.

Can anybody tell me how to solve the problem? very thanks.

Dec 22 '05 #1
12 2281
wangzx wrote:
I am the author of easyajax.sourceforge.net, and I have a problem on
Firefox 1.5, I post the problem here and hopes somebody help me.

The test page can be:
http://easyajax.sourceforge.net/demo/overview.html

The page works well in Firefox 1.0.* and IE 6.0, and Opera 8.5, but it
doesnt work on Firefox 1.5, the first time you open the page, it works
well, but when you refresh the page(such as CTRL-R), the page will
displayed in bad way.
You may need to make life a little easier for those who might take up
the challenge of helping you. The link has invalid XHTML - your
proposed method of including a custom jsclass attribute will ensure that
anyone using your 'easyajax' will also generate invalid (X)HTML.
You have:

<textarea ... disabled="true">

For valid XHTML use:

<textarea ... disabled="disabled">


When debug the code( It is difficult to debug without a working
debugger), i found that it was occursed at the following code:

var iframe = document.createElement("iframe");
iframe.src = this.url;
iframe.style.height = "0px"; iframe.style.width="0px";
//iframe.height = -1; iframe.width = -1;
// iframe.style.display = "none"; // not works in opera
this.element.insertBefore(iframe, null);
Somewhere in the 3,000 lines of code in the the 3 attached js files?


the iframe is hope to load the url normally, but in Firefox1.5(Refresh
mode), it load another url instead, not the given url.

Can anybody tell me how to solve the problem? very thanks.


Maybe something to do with:

<script type="text/javascript">
$("elSrc").value = $("elDiv").innerHTML;
</script>

Where is '$' defined? Somewhere in the 3 external js files?


--
Rob
Dec 22 '05 #2
VK

RobG wrote:
Where is '$' defined? Somewhere in the 3 external js files?


Yes, it's a standard function from prototype.js - replacement for way
too long document.getElementById

To OP:
Seems like "url" is not an allowed identifier in XHTML. Try to rename
it to something like 'myURL'. The reason it chokes on FF-only may be
because it's the only browser which takes this X-crap anyhow seriously
(besides Amaya of course).

The best and the most reliable way - especially if you plan to have a
redestributable solution with IE support - get all XHTML out and use
normal HTML. Use DTD Strict if it helps you sleep better :-)

Dec 22 '05 #3
Thanks.
Somewhere in the 3,000 lines of code in the the 3 attached js files?

the code is in easy.js line 184

Dec 22 '05 #4
> Seems like "url" is not an allowed identifier in XHTML. Try to rename
it to something like 'myURL'.

url is just a varible name in Javascript, it has no relation to the
XHTML element.
The best and the most reliable way - especially if you plan to have a

redestributable solution with IE support - get all XHTML out and use
normal HTML. Use DTD Strict if it helps you sleep better :-)

That is a bad things for easyajax, the framework heavly use extended
attribute in HTML element, and the attribute is understand by the
javascript library.

Dec 22 '05 #5
VK

wangzx wrote:
url is just a varible name in Javascript, it has no relation to the
XHTML element.
If you decided to use XHTML then forget the regular common sense - it
doesn't help too much. Get yourselve Amaya <http://www.w3.org/Amaya/>
and parse everything in this browser until no errors are shown. Edit
all errors however stupid or W3C-contradicting they would be. Only then
move one step forward.
In the particular your current page shows in Amaya:

*** Errors/warnings in
http://easyajax.sourceforge.net/demo/overview.html
line 19, char 0: Invalid XHTML attribute "jsclass"
line 19, char 0: Invalid XHTML attribute "url"
line 46: Missing mandatory attribute cols for element textarea
The framework heavly use extended attribute in HTML element

Which one? "space slash" at the end of tags? ;-)

For extended attrubutes and tags there are custom namespaces, standard,
well documented and supported across all modern browsers.

Dec 22 '05 #6
It looks IE' DOM doesnot support namespace access. That makes easyajax
choose default namespace to support both IE and Firefox.

Dec 22 '05 #7
VK

wangzx wrote:
It looks IE' DOM doesnot support namespace access.


Of course it does over scopeName property. See at:
<http://groups.google.co.uk/group/comp.lang.javascript/browse_frm/thread/d1ae4172c5bcba46/0da38b3070962dd0>

for Julian Turner post

Dec 22 '05 #8
"scopeName" applies on element only, it dont apply on attribute.

also, scopeName is not part of the DOM standard.

Once the browser support W3C DOM more, and AJAX world would be more
interesting.

for the origin problem,I think it is a bug in Firefox 1.5 on iframe
that is not occurs by the reason of namespace or name conflict..

Dec 22 '05 #9
VK

wangzx wrote:
"scopeName" applies on element only, it dont apply on attribute.
also, scopeName is not part of the DOM standard.
Once the browser support W3C DOM more, and AJAX world would be more
interesting.
You're the king - I'm just a humble adviser. I just feel the smell of
premature death from XHTML, so your waiting for better support may get
much longer than you think. But very well can be that it is something
wrong with my nose ;-)
for the origin problem,I think it is a bug in Firefox 1.5 on iframe
that is not occurs by the reason of namespace or name conflict..


Wery well can be. There is a very old and wery weird instability bug in
Firefox depending on how do you address dynamically created iframe and
even on how do you name it. The relevant description and newsgroup
thread link can be found at:
<http://www.geocities.com/schools_ring/ArrayAndHash.html#HTMLCollection>

Dec 22 '05 #10
wangzx wrote:
"scopeName" applies on element only, it dont apply on attribute.

also, scopeName is not part of the DOM standard.


XMLHttpRequest and its MSXML equivalent is not, too. Arguing that some
thing is not standard but releasing and recommending something that is not
standard is pointless.
PointedEars
Dec 22 '05 #11
very thanks. But i cant access the link now.
<http://www.geocities.com/schools_ring/ArrayAndHash.html#HTMLCollection>

Dec 23 '05 #12
VK

wangzx wrote:
very thanks. But i cant access the link now.
<http://www.geocities.com/schools_ring/ArrayAndHash.html#HTMLCollection>


Strange - it works just fine. Must be a temporary jam on Yahoo site,
try again.

Also the relevant thread is:
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/8005d8ef77288c39/186b0f8e07897987>

Dec 23 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Aaron Gray | last post: by
12 posts views Thread by mistral | last post: by
3 posts views Thread by CAG | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.