codetoad.com
Home||ASP|ASP.Net|C++/C#|DHTML|HTML|Java|Javascript|Perl|VB|XML||CodeToadPlus!||Forums||RAM
Search Site:
Search Forums:
Firefox cacbeary at 20:56 on Thursday, March 29, 2007

I used the code from this article http://www.interspire.com/content/articles/10/1 & it works great but not in Firefox. Instead of a list it is all over the place. Can anyone help me?

I just finished a class on design & now signed up for CSS stylesheet. DHTML will be the class after that.

Thanks

Cacbeary

Re: Firefox Sunil Kartikey at 12:31 on Tuesday, April 03, 2007

<html>
<head>
<script type="text/javascript">
var dhtmlDoc;
function loadDHTML()
{
//load DHTML file
// code for IE
if (window.ActiveXObject)
{
dhtmlDoc=new ActiveXObject("Microsoft.XMLDOM");
dhtmlDoc.async=false;
dhtmlDoc.load("note.html");
getmessage();
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
dhtmlDoc=document.implementation.createDocument("","",null);
dhtmlDoc.load("note.html");
dhtmlDoc.onload=getmessage;
}
else
{
alert('Your browser cannot handle this script');
}
}

function getmessage()
{
document.getElementById("to").innerHTML=dhtmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
document.getElementById("from").innerHTML=dhtmlDoc.getElementsByTagName("from")[0].childNodes[0].nodeValue;
document.getElementById("message").innerHTML=dhtmlDoc.getElementsByTagName("body")[0].childNodes[0].nodeValue;
}
</script>
</head>

<body onload="loadDHTML()">
Write here yr code of DHTML
</body>
</html>

note.html is your file name.. try this and see it should work!!!

Re: Firefox cacbeary at 14:29 on Tuesday, April 03, 2007

Thanks a bunch. But I was planning on using this in a template for several pages. Instead of note.html could I use this.html instead?

I guess I could make the change from note.html to whatever the page is but this would be a lot easier if it just worked from the template.

Thank you again.

Re: Firefox cacbeary at 15:40 on Tuesday, April 03, 2007

Here is the address of my code http://www.moriel.org/Carol/design_composite.htm

I put the code in & it says I have an error. I just don't know what I am doing.

This is a ministry. Hope it don't offend you. We're all volunteers here.

Thanks again.

Re: Firefox Sunil Kartikey at 04:57 on Wednesday, April 04, 2007

Hi Carol,
can u paste the code here, which is working fine in IE and not firefox.

Re: Firefox cacbeary at 06:55 on Wednesday, April 04, 2007

Here is the code including your added code.

<script language="JavaScript" type="text/JavaScript">
<!--
var last_expanded = '';

function showHide(id)
{
var obj = document.getElementById(id);

var status = obj.className;

if (status == 'hide') {

if (last_expanded != '') {
var last_obj = document.getElementById(last_expanded);
last_obj.className = 'hide';
}

obj.className = 'show';

last_expanded = id;
} else {
obj.className = 'hide';
}
}

//-->
</script>

<script type="text/javascript">
var dhtmlDoc;
function loadDHTML()
{
//load DHTML file
// code for IE
if (window.ActiveXObject)
{
dhtmlDoc=new ActiveXObject("Microsoft.XMLDOM");
dhtmlDoc.async=false;
dhtmlDoc.load("/forum/design_composite.htm");
getmessage();
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
dhtmlDoc=document.implementation.createDocument("","",null);
dhtmlDoc.load("/forum/design_composite.htm");
dhtmlDoc.onload=getmessage;
}
else
{
alert('Your browser cannot handle this script');
}
}

function getmessage()
{
document.getElementById("to").innerHTML=dhtmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
document.getElementById("from").innerHTML=dhtmlDoc.getElementsByTagName("from")[0].childNodes[0].nodeValue;
document.getElementById("message").innerHTML=dhtmlDoc.getElementsByTagName("body")[0].childNodes[0].nodeValue;
}
</script>


Duh! They had other people write in tweaking the code & I used the last code someone wrote in. But it didn't work in Firefox no matter what I did.

Thanks for the help.

Carol

Re: Firefox Sunil Kartikey at 07:10 on Tuesday, April 10, 2007

Check this url it will help you..

http://www.w3schools.com/xml/xml_parser.asp

Re: Firefox cacbeary at 14:06 on Tuesday, April 10, 2007

Thank you Sunil.

I'm still getting error messages, don't know what I'm doing wrong. I'm afraid this is all over my head. I am code deficient! In the design class I was told to make floats for the navigation. I don't know anything about CSS or any code.

I signed up for a CSS class & starts the end of April. Unfortunately, you learn floats in the second class, LOL! Everything is just going to have to be put on hold for about 6 months I guess until I learn it. What a bummer.

Anyway, thanks you for all the help you have given me and for your patience.

Carol

Re: Firefox Sunil Kartikey at 14:37 on Tuesday, April 10, 2007

Hey Carol,
don't feel bad.. without doing mistakes you cant learn .. so keep doing mistakes and keep learning :-)


Also try this article its really good.

http://www.reloco.com.ar/mozilla/compat.html


Re: Firefox cacbeary at 16:11 on Tuesday, April 10, 2007

Thanks for the article. When I'm in CSS class, I will be talking about the compatibility problems with all of this.

I think the main problem is time. You have your work, your life, & volunteering to do this site - there just isn't enough hours in the day. You just make time for what you want when you can. The plus side is they are paying for the classes & knowledge is power!

Carol








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
matrix addition
Re: Storing data from HTML to Excel or TXT
Re: function within loop problem
Re: Ô‡´ò¥¯¥é¥Ö¤Ï ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
Re: Replace
Re: タイトリスト AP2アイアン 712�情�
Re: SMS from Perl using HTTP request
Re: Charl Schwartzel
Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


Copyright codetoad.com 2001-2013