473,898 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The parameter is incorrect - appendChild - problem

5 New Member
I am opened window.open(chi ld.aspx page) from the parent.aspx file

the below code is from parent.aspx,
Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD>
  3. ......
  4. </HEAD>
  5. <body onload="loadXML();">
  6. .....
  7. <input id="AddSecurityBtn" type="button" runat="server" onclick='javascript: Args[0] = objDoc.selectSingleNode('//Books'); Args[1] = buildBookTable ; Args[2] =null; window.open('child.aspx','800','900');' value="Add Books" />
  8. ....
  9. </body>
  10. </html>
the fnction loadXML(); is defined in ABC.js file where it loading one templet of xml file and the object to access this xml is objDoc.

Expand|Select|Wrap|Line Numbers
  1. objDoc.xml = <?xml version="1.0" encoding="utf-8"?><Student><Class/><Books/><OtherDetails/></Student>

The below code is from child.aspx.

Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD>
  3. <script language="javascript">
  4. function addBookToXML() {
  5. var objDOM = new ActiveXObject("Msxml2.DOMDocument.3.0")
  6. var secNode = window.opener.Args[0]
  7. var func = opener.Args[1]
  8. for (var i=0; i<document.all.length; i++) {
  9. if (document.all(i).getAttribute("TYPE") == "checkbox"){
  10. if (document.all(i).checked) {
  11. var newNode = objDOM.createElement("book")
  12. newNode.setAttribute("id", document.all(i).getAttribute("id"))
  13. newNode.setAttribute("name", document.all(i).getAttribute("bookname"))
  14. newNode.setAttribute("Selected", "T")
  15. newNode.text = document.all(i).getAttribute("description")
  16.  
  17. secNode.appendChild(newNode)      //here i an getting problem as "The parameter is incorrect"
  18.  
  19. }
  20. }
  21. }
  22. objDOM = null
  23. func() 
  24. }
  25. </script>
  26. </HEAD>
  27. <body >
  28. ......
  29. <input type="button" id="SearchModeBtn" onserverclick="GetBookResults" value="Search"  runat="server">
  30. <input type="button" id="AddSecOK" value="OK" onclick="javascript: addBookToXML(); self.close();" runat="server">
  31. <input type="button" value="Cancel" id="AddSecCancel" onclick="javascript: self.close();" runat="server">
  32. .....
  33. </body>
  34. </html>
GetBookResults is server side function which retrive all the books from database to child.aspx page.

when i check secNode.xml is <Books/>
and in newNode.xml is <book id="234" name="book234" selected="T"> Book Description in brife</book>

expected in secNode.xml is after appending <Books><book id="234" name="book234" selected="T"> Book Description in brife</book></Books>

this is working fine in IE7 getting problem in IE8

fun thing is last evenining this was working fine :) . but when i started checking today morning with out changing any code... again it is give same error. :(
Dec 2 '09 #1
2 3778
RamananKalirajan
608 Contributor
What is the error you are getting?

Thanks and Regards
Ramanan Kalirajan
Dec 2 '09 #2
GuruPrasadBytes
5 New Member
secNode.appendC hild(newNode) //here i an getting problem as "The parameter is incorrect"
Dec 2 '09 #3

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

Similar topics

5
7409
by: Michelle Kinsey-Clinton | last post by:
Hello, I am writing an ASP app which is giving me some very frustrating errors. They appear intermittently, no real pattern to them, and often go away if you reload, or back up a few pages and start over again. The first error is logged as a 400 error and says only, "The parameter is incorrect." It (mostly, but not always) happens upon submitting a form, and a reload is generally successful in bringing the page up just fine. I have...
3
16952
by: WGW | last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost! everything I need. Maybe not efficiently, but usefully. However, I have a problem -- a complex query problem... I can create a parameter query in a stored procedure, but how do I use the result set of a parameter query in a select query (in the same or another sp)? In short, if a select query contains a result table that is generated as a parameter query, how do I...
25
5215
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to calculate the totals in each row. when i try however, i receive the error: "Error: 'elements' is null or not an object"
7
3051
by: Britney | last post by:
Original code: this.oleDbSelectCommand1.CommandText = "SELECT TOP 100 user_id, password, nick_name, sex, age, has_picture, city, state, " + "country FROM dbo.users WHERE (has_picture = ?) AND (sex = ?) ORDER BY age " this.oleDbSelectCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("has_picture", System.Data.OleDb.OleDbType.Boolean, 1, "has_picture")); this.oleDbSelectCommand1.Parameters.Add(new...
3
1378
by: Ralph Purtcher-Wydenbruck | last post by:
This is a worrying bug, and indicates a potential problem in the Framework CLR. This bug affected a project I was working on, which behaved differently when run from the Visual Studio IDE than when run by double clicking on the project's EXE file. The problem can be replicated easily: Create a new project in Visual Studio 2003 and add the following code. Module Main Sub Main()
10
2526
by: Sean Dockery | last post by:
I have the following HTML file that I've been using for testing... <html> <head> <script type="text/javascript"> <!-- function handleWindowLoad() { var items = ; for (var i = 0; i < 11; i++) { items = "item" + (i + 1);
1
3632
by: Joe Monnin | last post by:
I have a web service that takes an XmlDocument as a parameter, performs some processing on it, and saves it to a database. The web service signature looks similar to this: public void SaveDocument(XmlDocument doc) { //Method logic omitted } The web service worked great in .net 1.1, but upon upgrading to .net 2.0 IIS
5
3633
by: Dennis | last post by:
Hi I'm trying to alter my stored procedure to take a parameter for the Database Name, but as usual the syntax is killing me. Thanks for any help Dennis '--------------------------------------------------------------------------≠-------------------------------- Before - This Works without a paramater '--------------------------------------------------------------------------≠--------------------------------
5
3499
by: Jason | last post by:
Hi all, Are you familiar with Safari? I have a site that works perfectly in IE6 IE7 FF2 FF3 but not in the latest Safari. When I test xsltProcessor, there is a error as following, I have dealt with this issue for several days, but there is no result. Could someone help me? <html> <head>
0
9993
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
11259
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...
0
10857
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10483
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5880
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
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4706
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
2
4295
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3305
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.