here's the code (running from an ASP page):
<script language = "JavaScript" type="text/javascript">
function initStuff() {
var scanWindow = window.open('scanning.htm', 'scanning',
'status=yes,height=200,width=450,top=10,left=10,sc rollbars=yes');
}
function updatestats (icount,smessage,iupdate,tcount) {
//var scanStatus = scanWindow.document.form1;
alert('scanWindowCheck sc=
['+scanWindow.document.form1.scanWindowCheck.value + ']');
var objscan = scanWindow.document.form1 ;
if (iupdate == "doc") {
objscan.getElementById("docstats").value = icount ;
}
if (iupdate == "fld") {
objscan.getElementById("fldstats").value = icount ;
}
objscan.getElementById("mess").value=smessage;
objscan.getElementById("total").value=tcount;
}
</script>
initStuff is called after the <body> tag, there is then a loop to give
'scanWindow' time to load and render (this runs from server side to
prevent any load on the client).
updatestats, on first call, gives out "scanWindow is undefined" as it
tries to fire the alert box.
Previously I had an alert that looked for the field value of a small form
on the page, that is updated from the popup. This appears to change
correctly when the popup has rendered its own form (form1 in this
context).
what's going wrong? 1 2188
"s_m_b" <sm********@hotmail.com> wrote in
news:Xn**********************************@216.196. 97.138: here's the code (running from an ASP page): <script language = "JavaScript" type="text/javascript"> function initStuff() { var scanWindow = window.open('scanning.htm', 'scanning', 'status=yes,height=200,width=450,top=10,left=10,sc rollbars=yes'); } function updatestats (icount,smessage,iupdate,tcount) { //var scanStatus = scanWindow.document.form1; alert('scanWindowCheck sc= ['+scanWindow.document.form1.scanWindowCheck.value + ']'); var objscan = scanWindow.document.form1 ; if (iupdate == "doc") { objscan.getElementById("docstats").value = icount ; } if (iupdate == "fld") { objscan.getElementById("fldstats").value = icount ; } objscan.getElementById("mess").value=smessage; objscan.getElementById("total").value=tcount; } </script> initStuff is called after the <body> tag, there is then a loop to give 'scanWindow' time to load and render (this runs from server side to prevent any load on the client). updatestats, on first call, gives out "scanWindow is undefined" as it tries to fire the alert box. Previously I had an alert that looked for the field value of a small form on the page, that is updated from the popup. This appears to change correctly when the popup has rendered its own form (form1 in this context).
what's going wrong?
solved it - misunderstood the previous instructions about using a object
reference, so had the initStuff function return an object and its fine now! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Nofelt |
last post by:
Hey all,
I am running into an issue. My situation is that I wish to copy the
contents of one listbox to an array, sort it by innerText value, and
write the sorted options into a new listbox.
...
|
by: jimjim |
last post by:
Hello,
This is a simple question for you all, I guess .
int main(){
double *g= new double;
*g = 9;
delete g;
cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl;
*g =...
|
by: JRoe |
last post by:
Hello,
I am beside myself with this problem.
I need to access unmanged C++ code in a C# environment. I have created
a managed C++ wrapper that wraps the unmanaged class.
When I call the...
|
by: Kevin Prichard |
last post by:
Hi all,
I've recently been following the object-oriented techiques discussed
here and have been testing them for use in a web application. There is
problem that I'd like to discuss with you...
|
by: yb |
last post by:
Hi,
Is there a standard for the global 'window' object in browsers? For
example, it supports methods such as setInterval and clearInterval, and
several others.
I know that w3c standardized...
| |
by: Ike |
last post by:
Can someone please illuminate to me why, in the following snippet of script,
the alert statement in the try-catch gives me ? The file
'http://localhost:1222/roomx1/getdata.php' truly does exist....
|
by: removeps-generic |
last post by:
Hi. I'm using placement new to re-initialize part of an object. Is
this OK?
struct BaseImp
{
All& r_all;
BaseImp(All& all) : r_all(all)
};
struct Calc::Imp : public BaseImp
|
by: Andrew Ward |
last post by:
Consider the following:
#include <iostream>
struct X
{
int x;
X() { x = 6; }
};
|
by: petermichaux |
last post by:
Hi,
I have been using the following line of code to create an object called
"Serious" if it doesn't already exist.
if (Serious == null) {var Serious = {};}
This works in the scripts I use...
|
by: ziman137 |
last post by:
Hi all,
The results from following codes got me a bit confused.
#include <stdio.h>
#include <iostream>
using namespace std;
struct A {
|
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,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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: 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...
|
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...
|
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,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 ...
|
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...
| |