iframe probelm in Firefox 1.5

W

wangzx

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.
 
R

RobG

wangzx said:
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:

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?
 
V

VK

RobG said:
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 :)
 
W

wangzx

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.
 
V

VK

wangzx said:
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.
 
W

wangzx

It looks IE' DOM doesnot support namespace access. That makes easyajax
choose default namespace to support both IE and Firefox.
 
W

wangzx

"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..
 
V

VK

wangzx said:
"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>
 
T

Thomas 'PointedEars' Lahn

wangzx said:
"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top