473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2456
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Aaron Gray | last post by:
Hi, I want to access the properties of an IFrame but seem unable to get access to the IFrames document body. <html> <body> <iframe src="test.html" id="IFrame"></iframe> </body>
1
by: brussel | last post by:
I'm trying to copy information in one iframe to another iframe with javascript. I am using firefox and information from my local domain so there are no security issues. However I'm just not getting...
1
by: Dave | last post by:
Usual apologies if this is old territory. I'm resizing a bunch of iframes on a page to the height of their contained documents. Some of the contained documents contain IMG tags. On IE this...
12
by: mistral | last post by:
Can anybody tell me how to get source code of page in iframe? (popup window is clickable image). When I right click on this popup border to view source, i see just as follows <html> <head>...
3
by: visu | last post by:
Hi , I need a solution for my problem with IFRAME in firefox. The problem is that i ve to make the IFRAME to increase in its height to displays its whole content dynamically .i ve set...
3
by: CAG | last post by:
Hello, I have following scenario in my web application. I want to load different web forms in single iframe. Iframe in contained in an ASP page. ASP page has “Submit” button, which submits iframe...
1
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: SunshineInTheRain | last post by:
My project has 3 files, File1 has included master page. file1 consists of iframe1 that load file2. File2 consists of iframe2 that load file3. Javascript used on each file to resize the iframe...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.