473,395 Members | 1,676 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,395 software developers and data experts.

document.all not working in firefox

46
Hi!

I have a problem with document.all which doesn't work in Firefox....can anybody give solution...plz.

Expand|Select|Wrap|Line Numbers
  1. function validateData(elen,strValidateStr,obj) 
  2. {
  3. var objValue=this.document.all.namedItem(obj)
  4.  
);
Aug 3 '07 #1
11 12660
honey99
46
Hi!

I have a problem with document.all which doesn't work in Firefox....can anybody give solution...plz.



Expand|Select|Wrap|Line Numbers
  1. function validateData(elen,strValidateStr,obj) 
  2. {
  3. var objValue=this.document.all.namedItem(obj)
  4. }
Aug 3 '07 #2
gits
5,390 Expert Mod 4TB
hi ...

give your elements an id and always use

Expand|Select|Wrap|Line Numbers
  1. var obj   = document.getElementById('id_value');
  2. var value = obj.value;
that is the standards-compliant way ... document.all is not used by moz/FF-browsers ...

kind regards
Aug 3 '07 #3
honey99
46
hi ...

give your elements an id and always use

Expand|Select|Wrap|Line Numbers
  1. var obj   = document.getElementById('id_value');
  2. var value = obj.value;
that is the standards-compliant way ... document.all is not used by moz/FF-browsers ...

kind regards
Thank u very much it's working....
Aug 3 '07 #4
gits
5,390 Expert Mod 4TB
;) ask more questions anytime ... and note: it is much better for development to develop your code with FF/Mozilla/Opera/Safari (this certainly provides much better debugging tools too) and then as a last step to adapt it to IE-specifics ... a lot of things are working the standards way in IE too ... i think they are trying to adopt the standards ... but some things don't work ... and only this have to be adapted for use in IE ... i promise ... that way is much better then having an IE-specific application that has to be adapted for all other browsers ... ;)

kind regards
Aug 3 '07 #5
drhowarddrfine
7,435 Expert 4TB
document.all is not a standard javascript call, unless something has changed in the last few years.
Don't use it.

But this is a javascript question that should be asked on the javascript board.
Aug 3 '07 #6
honey99
46
Hi!
i have a problem with document.all...it is not working in firefox..plz check the code and give me a solution

Expand|Select|Wrap|Line Numbers
  1. var objValue=this.document.all.namedItem(obj);
Aug 7 '07 #7
acoder
16,027 Expert Mod 8TB
document.all is non-standard and only works in IE and one or two others.

Use document.getElementById instead:
Expand|Select|Wrap|Line Numbers
  1. var objValue = document.getElementById(obj).value;
Aug 7 '07 #8
honey99
46
document.all is non-standard and only works in IE and one or two others.

Use document.getElementById instead:
Expand|Select|Wrap|Line Numbers
  1. var objValue = document.getElementById(obj).value;
Thank u but i'm getting errors in the following code like
this.document.getElementById(obj).value has no properties....wht can i do...plz go through this code once

Expand|Select|Wrap|Line Numbers
  1. function validate(elementname,ValidateStr,obj) 
  2. {
  3. var objValue=thisdocument.getElementById(obj).value
  4. }
Aug 7 '07 #9
acoder
16,027 Expert Mod 8TB
Thank u but i'm getting errors in the following code like
this.document.getElementById(obj).value has no properties....wht can i do...plz go through this code once

Expand|Select|Wrap|Line Numbers
  1. function validate(elementname,ValidateStr,obj) 
  2. {
  3. var objValue=thisdocument.getElementById(obj).value
  4. }
How are you calling this function?
Aug 7 '07 #10
honey99
46
How are you calling this function?
i'm writing this funtion validate() in one javascript file and this javascript file is calling in a jsp file.....
Aug 7 '07 #11
acoder
16,027 Expert Mod 8TB
i'm writing this funtion validate() in one javascript file and this javascript file is calling in a jsp file.....
OK, let me rephrase that for you. What arguments are you passing in the function call? In other words, what is elementname, validateStr and obj?
Aug 7 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: sonic_soul | last post by:
Hi, I was curious if I could make my webservice work with firefox client webservice functionality. (i got it to work with webservice.htc) I am able to get firefox to see my serverside web...
3
by: coolsti | last post by:
Can someone help me enhance this code snippet which works only for IE so that it will also work for Firefox? I have been trying all sorts of things and have gotten to where I can capture the...
5
by: Derek Erb | last post by:
I am banging my head against the wall with this one. The following code snippets work perfectly fine in MSIE6. But produce an error in Firefox and do not work at all. BROWSER.HTM <HTML> .......
2
by: AndrewW | last post by:
Hi I have an application that draws a selection rectangle over a map image. I can get it to work fine in IE and Opera, but not Firefox/Netscape. I've thrown the following small example...
3
by: TJS | last post by:
I am finding that the serverside requiredvalidator doesn't fire in the firefox browser, and user request proceeds through to my updateProfile method. Validation is working correctly in the IE...
7
by: VK | last post by:
Is it possible to include SVG object right onto HTML page in Firefox 1.5? (I mean native SVG, not SVG plugin) .... <svg> .... </svg> All samples on mozilla.org are either stay-alone .svg...
1
by: Varaj | last post by:
DOMService service = DOMService.getService(applet); service.invokeAndWait(new DOMAction() { public Object run(DOMAccessor accessor) { ...
6
by: laramie.hartmann | last post by:
I have a script (see below) that accesses a XML file and displays the contents through a series of document.write calls. This all works fine in IE, but not at all in Firefox. I get no errors in the...
13
by: Gretsch | last post by:
Re XML, Javascript, IE, Firefox Hi, I have a very simple & small XML file (only 7 variables). The code works for IE, but not for Firefox. I've search around and found lots of alternatives, but...
3
by: geetha v | last post by:
Hi All, I need a scrolling DIV is a to display my dynamic tree in left frame. In my jsp , Div overflow is set to "auto" <DIV id=divScroller style="overflow:auto;height:200px"> <!--...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.