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

The parameter is incorrect - appendChild - problem

I am opened window.open(child.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 3752
RamananKalirajan
608 512MB
What is the error you are getting?

Thanks and Regards
Ramanan Kalirajan
Dec 2 '09 #2
secNode.appendChild(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
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...
3
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...
25
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...
7
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...
3
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...
10
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++)...
1
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...
5
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 ...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.