473,805 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Required..

I have a Javascript function, which changes a text field of a form into
a select field. Following is the function

function changeStateFiel d()
{

var myForm = document.getEle mentsByTagName( "form")[0];

alert(myForm.st ateId.value);
myForm.removeCh ild(myForm.stat eId);

var stateSelect = document.create Element("select ");
stateSelect.set Attribute("stat eId2", "stateId");
myForm.insertBe fore(stateSelec t, myForm.countyId );
}

Function displays the correct value in alert. but on line 3
myForm.removeCh ild(myForm.stat eId);
it gives following error. I am using Firefox.

Error: uncaught exception: [Exception... "Node was not found" code:
"8" nsresult: "0x80530008 (NS_ERROR_DOM_N OT_FOUND_ERR)" location:
"http://localhost:8080/APP/premiseCatalog. do Line: 245"]

Your help will be greately appreciated.

Regards,
Naeem.

Nov 21 '06
11 4003
ASM
Elegie a écrit :
ASM wrote:
>done

it's a P

if we can no more believe what we read !

Nope if it tells you P then it's definitely P! I get BODY on IE6 on
Windows,
In my test the form is in a "normal" page in HTML3.1
Well or bad formed will be to ask to Claris HomePage 3 :-)

Asked view source to Firefox ...
tremendous ! CWK did put the input in a P :-(

I knew to have to do not use CWK and its automatic correction.

The form now in a page with doctype and so on is now correctly seen as a
parentNode of the input.

Test with a reduced page (no doctype, head nor body) runs fine with
IE 5.2, FF 2, iCab 3, Safari 1.3.2, Opera 9.0

Was only noise ... :-(

Anyway, not lost my time, I get bellow a new light about IE Win
--- yields BODY on IE6, Windows ---
<form>
<input name="stateId" id="stateId" type=text value="123">
<input type="button"
value="Parent?"
onclick="alert( this.form.state Id.parentNode.n odeName)">
</form>
---
--- yields FORM on IE6, Windows ---
<body>
<form>
<input name="stateId" id="stateId" type=text value="123">
<input type="button"
value="Parent?"
onclick="alert( this.form.state Id.parentNode.n odeName)">
</form>
</body>
---

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 22 '06 #11
I have solved the problem. This was due to discusstion between ASM and
Elegie...Thank you guys...Thank you Evertjan to you as well.
Regards,
Naeem

Nov 22 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6332
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334, column 13: there is no attribute "SRC" <bgsound src="C:\My Documents\zingwent.mids"> You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is...
4
2013
by: Mike | last post by:
Please help this is driving me nuts. I have 2 forms, 1 user class and I am trying to implement a singleton class. Form 1 should create a user object and populate some properties in user. Form2 should then have access to those user properties. I am not getting the property value from user that was set in form1. Sorry for posting so much code but I need help bad. How do i make this work? Thanks Mike
0
1392
by: Vish | last post by:
I am trying to use xmldatadocument to load an xml file.The xml has the data as attributes, the datadocument is able to successfully parse the document into the tables and shows the right column count but does not add any rows. I tried validating the schema everything is fine but no data is returned . I have attached the sample xml file and schema. Any help is appreciated . Thanks! <SiebelMessage CallingApp="COM" ErrorMsg="" ErrorCode=""...
3
2240
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
2
5049
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified folder structure and naming conventions and then send a Net send message to those users telling them to rectify. The information I want to get is when you select the file/folder and then: Properties -> Security Tab -> Advanced Button -> Owner Tab ->...
6
2329
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with: ' The following example displays an application that provides the ability to ' open rich text files (rtf) into the RichTextBox. The example demonstrates ' using the FolderBrowserDialog to set the default directory for opening files. ' The...
5
3737
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button. When the user clicks the "Add another email" it will call a client side JavaScript function, add_email, which will dynamically add a new set of controls to the webpage using the innerHTML method. It appears to work perfectly fine in the browser. The...
36
3114
by: aljamala | last post by:
Hi, I keep getting this warning on a page, but I do not know what the problem is...does anyone have an idea about what could be wrong? line 88 column 7 - Warning: missing </formbefore <td> it highlights this line: <form name="frmCurrency" action="" method="post"> Page source....
5
1618
by: forest demon | last post by:
i'm trying to create a .xsd file to validate the XML below(just a small snippet). i've tried a number of things and can come close, but i can't quite get it to do what i want. i'm able to validate the snippet below using .NET with a schema that will make sure that the six attributes are correct in spelling, but that's about it. i would like it to be able to: 1) make sure each element(tool) is correct by having all the six attributes...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.