I have a main window containing a list of items along with some buttons. If the user clicks the 'View' button, I open a child window containing the details of the item along with 'Approve' and 'Reject' buttons.
What I'm trying to do is if the user presses the 'Approve' button on the child window, then the parent window is updated via an AJAX function within the parent's <SCRIPT> tags and the child window is closed.
I've tried running the parent function from the child window via window.opener.l oadApprovalList () (which does run) but it returns an error stating '[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_A VAILABLE) [nsIXMLHttpReque st.status]" nsresult: "0x80040111 (NS_ERROR_NOT_A VAILABLE)" location: "JS frame :: http://localhost/cgi-bin/functions.js :: parseApprovalLi st :: line 171" data: no]
Any ideas what's going on?
3 2087 acoder 16,027
Recognized Expert Moderator MVP
Welcome to TSDN!
Post the code for loadApprovalLis t().
I've narrowed the problem down to this:
it appears that once I perform a document.x.subm it() and then try to do an xmlhttp.open, the browser (only tested with FF at this juncture) does a submit().
Anyway, here is the relevant code: - function postDoc(data,func)
-
{
-
var url='/cgi-bin/ajax.js';
-
-
// Mozilla, etc.
-
if (window.XMLHttpRequest)
-
{ xmlhttp=new XMLHttpRequest();
-
xmlhttp.onreadystatechange=func;
-
xmlhttp.open("POST",url,true);
-
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
-
xmlhttp.send(data);
-
}
-
// IE
-
else if (window.ActiveXObject)
-
{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
-
if (xmlhttp)
-
{ xmlhttp.onreadystatechange=func;
-
xmlhttp.open("POST",url,true);
-
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
-
xmlhttp.send(data);
-
}
-
}
-
}
-
-
function loadApprovalList()
-
{
-
postDoc('function=listApprovals',parseApprovalList);
-
}
-
Note: I'd post the parseApprovalLi st function, but it never gets called!
acoder 16,027
Recognized Expert Moderator MVP
The error is in parseApprovalLi st, line 171.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Filiz Duman |
last post by:
Is it possible to call a javascript function based in the parent window from
the child window ?
I do open a pop up window from the parent window with:
newwindow = window.open (...)
and assign a value from the child window to the parent window text field:
opener.document.forms.elements.value = valuename;
|
by: Reply Via Newsgroup |
last post by:
Folks,
I was sure this could be done - or at least sure I had seen reference to
it at some point or other - but now, after having gone for a cup of tea,
am begining to doubt my original belief.
Can I have a script, available in a parent function, called from a child
window? If so, how?
And... if so, why? I mean, while sipping my tea, I realised that if the
|
by: Raj |
last post by:
Hi All,
I have a problem with trying to refresh the parent window from
child window in order to update data in the parent window.
The sequence of events are
1) I click a button in the parent window to open a child window thru
javascript
window.open
2) I have some functionality in the child window that changes the data
|
by: tcole6 |
last post by:
My problem appears to be Firefox specific.
I have a hyperlink that loads a new window. This window contains
hyperlinks that call javascript functions in the parent window and then
closes the child window. The function that is called contains an
XMLHttpRequest.
My problem is that everything happens as it should, the innerHTML is
changed by the results of the XMLHttpRequest and the child window
closes. The problem is this, in Firefox,...
|
by: Rob Meade |
last post by:
Hi all,
I played with my first bit of AJAX the other week and was pleasantly
surprised that I achieved my goal..now I'd like to try something else..
Question...
If I have an updatePanel, and lets say I have a button as a trigger which
runs a function in my code behind to add a textbox to the updatePanel, when
the form is submitted does this control actually "exist" as such on the
| |
by: jaynick |
last post by:
Hello, everyone! I'm hoping that someone in this forum will be kind enough to help me out. I am having a Javascript issue related to Ajax and I just can't seem to figure it out. I am currently using the following Javascript code for Ajax purposes and it works perfectly:
<script language = "javascript">
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if...
|
by: mndprasad |
last post by:
Hi friends,
Am new to AJAX coding, In my program am going to have two texbox which going to implent AJAX from same table. One box is going to retrieve the value of other and vice versa.
I have implemented successfully for one text box, but it's done for the other field, since am getting script errors.
<script>
var queryField;
var lookupURL;
var divName;
|
by: V S Rawat |
last post by:
(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b. http://localhost/ is E:\wamp\www\
I have put the first php script to hello.php file:
<html>
<head>
<title>PHP Test</title>
|
by: Frinavale |
last post by:
I have 2 FireFox (version 2) browser windows opened.
One is the child of the other.
When the user is finished with the child window, a method in the parent window is called to refresh a section of the page.
This is the JavaScript code that I'm using to refresh the content in the parent page:
<script type="text/javascript">
function UpdateList() {
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |