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

help regarding document.getElementById('').styles.display

omerbutt
638 512MB
hi there i am amking an inventory application with php,ajax,javascript,html,dhtml,sql
the problem is that i have hidden the input fields regarding the replace no's of the parts with this line of code

Expand|Select|Wrap|Line Numbers
  1.         document.getElementById('bgrp1').style.visibility='hidden';
  2.     document.getElementById('lable_rp_no1').style.display='none';
  3.     document.getElementById('rp_no1').style.display='hidden';
  4.  
the code for the html part is here

[HTML]
<tr><td class="add" id="bgrp1"><div align="left" id="lable_rp_no1">Replace No1:</div></td>
<td width="150" align="Center" valign="Center"><div align="left" id="div_rp_no1" class="addinp"><input name="rp_no1" type="text" size="25" ></div></td>
</tr>
[/HTML]

the problem is that it runs absolutely perfect in the internet explorer, and hides the input fields also ,but when i try to run it in the FIREFOX it gives me error on the line

document.getElementById('rp_no1').style.display='h idden';

and the error is
Expand|Select|Wrap|Line Numbers
  1. Error: document.getElementById("rp_no1") has no properties
  2. Source File: http://localhost/ashar/js/Ad_stk2.js
  3. Line: 346
  4.  
any suggestions for this awaiting reply ,
regards,
omer
Feb 11 '08 #1
4 2004
acoder
16,027 Expert Mod 8TB
There's no element with id rp_no1. IE erroneously allows you to access elements by id using their name, rather than the id only.
Feb 11 '08 #2
omerbutt
638 512MB
There's no element with id rp_no1. IE erroneously allows you to access elements by id using their name, rather than the id only.
sir i even gave the id="rp_no1" in the input field but it still gives me the same error
Feb 11 '08 #3
omerbutt
638 512MB
sir i even gave the id="rp_no1" in the input field but it still gives me the same error
hey sorry for the last post it solved my problem sir
regards,
omer.
Feb 11 '08 #4
acoder
16,027 Expert Mod 8TB
Glad to hear that you got it working. Remember that getElementById means ID only.
Feb 11 '08 #5

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

Similar topics

5
by: Zambien | last post by:
Hi all, Here's my problem. I have tables that are using the menu/submenu idea for hiding rows. This works fine in IE (of course) and does show/hide correctly in netscape, but as soon as the...
5
by: mt | last post by:
In a nutshell, I'd like to have a list of items, each of which fills out a small table which displays some info about a particular item(the items being a trouble ticket for a tech support ASP-built...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
by: hzgt9b | last post by:
I've written a simple javascript page that parses an XML file... (Actually I just modified the "Parsing an XML File" sample from http://www.w3schools.com/dom/dom_parser.asp) The page works great...
2
by: davidson1 | last post by:
Hai friends..for menu to use in my website..i found in one website....pl look below website.... http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm i downloaded 2 files.... ...
29
by: Barry | last post by:
I know this is not a php question. If that bothers you, don't respond. If not, I sure could use the advice... I'm using a very abbreviated set of code to show a calendar. The idea is to simply...
0
omerbutt
by: omerbutt | last post by:
hi there i have tried to make my own AJAX tooltip it works all right and every things fine and the tooltip display right under the element i want to display untill unless i switch my resolution, it...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.