Hi!
After transforming XML to CSV format I open an HTA to save the CSV to
the client. All goes well, the function looks like this:
function buttonExportCli ck()
{
var xslt = new ActiveXObject(' Msxml2.XSLTempl ate.3.0');
var s = new ActiveXObject(' msxml2.FreeThre adedDOMDocument .3.0');
s.async=false;
s.load("/lib/xtable/convert.xsl");
var xslProc;
xslt.stylesheet = s;
var xmlDoc = document.XMLDoc ument;
if (xmlDoc==null)
{xmlDoc=navigat or.XMLDocument} ;
xslProc = xslt.createProc essor();
xslProc.input = xmlDoc;
xslProc.transfo rm();
output = xslProc.output;
var newwin = window.open('/lib/xtable/htatest.hta');
}
However, to be able to save the CSV I need to pass the variable
'output' (which is the transformation output) to the HTA. I have tried
several ways to do this, but none of them will work. Can anyone help
me? I hope someone knows how to do this, thanks in advance!
Sharon 4 6068
In article <2b************ **************@ posting.google. com>, es*****@hotmail .com enlightened us with... output = xslProc.output; var newwin = window.open('/lib/xtable/htatest.hta'); }
However, to be able to save the CSV I need to pass the variable 'output' (which is the transformation output) to the HTA. I have tried several ways to do this, but none of them will work. Can anyone help me? I hope someone knows how to do this, thanks in advance!
Did you try passing it via the URL and getting it from location.search ?
var newwin = window.open('/lib/xtable/htatest.hta?'+o utput);
--
--
~kaeli~
If a turtle doesn't have a shell, is he homeless or naked? http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace
"Sharon" <es*****@hotmai l.com> wrote in message
news:2b******** *************** ***@posting.goo gle.com... Hi! After transforming XML to CSV format I open an HTA to save the CSV to the client. All goes well, the function looks like this:
function buttonExportCli ck() { var xslt = new ActiveXObject(' Msxml2.XSLTempl ate.3.0'); var s = new ActiveXObject(' msxml2.FreeThre adedDOMDocument .3.0'); s.async=false; s.load("/lib/xtable/convert.xsl"); var xslProc; xslt.stylesheet = s; var xmlDoc = document.XMLDoc ument; if (xmlDoc==null) {xmlDoc=navigat or.XMLDocument} ; xslProc = xslt.createProc essor(); xslProc.input = xmlDoc; xslProc.transfo rm(); output = xslProc.output; var newwin = window.open('/lib/xtable/htatest.hta'); }
AFAIK an hta behaves like any other html document but
then, what do I know. This isn't tested.
var newwin = window.open('/lib/xtable/htatest.hta?out put');
then use location.search in the hta to see your variable
HTH
Jimbo However, to be able to save the CSV I need to pass the variable 'output' (which is the transformation output) to the HTA. I have tried several ways to do this, but none of them will work. Can anyone help me? I hope someone knows how to do this, thanks in advance! Sharon
Thanks, works great! However, the variable I'm passing can be rather
big, depending on the table I'm transforming into CSV format. When it
gets bigger than, say, 60 records, there's an error when I try to call
the HTA and pass the variable via the URL. Is there any other way to
pass big long strings, or should I break them up or something? Hope you
can help me!
Sharon
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
In article <41************ **********@news .newsgroups.ws> , es*****@hotmail .com
enlightened us with... Thanks, works great! However, the variable I'm passing can be rather big, depending on the table I'm transforming into CSV format. When it gets bigger than, say, 60 records, there's an error when I try to call the HTA and pass the variable via the URL. Is there any other way to pass big long strings, or should I break them up or something? Hope you can help me!
Actually, no, there really isn't a way once the URL gets really long. There's
a limit of like 255 chars, I *think*.
Possible workarounds to consider:
1. Write output to temp file, pass name of temp file in URL, use temp file in
HTA. Original application must have write permissions somewhere for this to
happen. If you have problems, try using the temp internet files cache.
2. Object persistence. Make the activex object part of a real object (you
create) with a getter and setter instead of declaring it in the function,
then have the hta get the object itself from its opener. Note that this will
only work if the opener is available (if window closed, no good).
--
--
~kaeli~
Can you be a closet claustrophobic? http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randell D. |
last post by:
Folks,
I've asked this before but never got any response but its important and I
thought I'd pitch it again (hopefully a bit clearer)...
One can pass data from one function to another either by passing a copy, or
passing by reference.
My understanding of passing by reference (putting the & before a variable
during the function...
|
by: Seeker |
last post by:
Newbie question here...
I have a form with some radio buttons. To verify that at least one of the
buttons was chosen I use the following code ("f" is my form object) :
var btnChosen;
for (count = 0; count <= 1; count++) {
if (eval(f.RadioButtons.checked)) {
btnChosen = true;
}
|
by: wilson |
last post by:
Dear all,
In this time, I want to pass array to function.
What should I declare the parameter in the function?i
int array or int array? Which one is correct?
/********************************************************
Below is my code:
********************************************************/
|
by: z_learning_tester |
last post by:
I'm reading the MS press C# book and there seems to be a contradiction.
Please tell me which one is correct, 1 or 2.
Thanks!
Jeff
1. First it gives the code below saying that it prints 0 then 42.
They say that 42 is printed the second time since the value was wrapped in a
class and therefore became passed by reference.
(sorry for any...
|
by: drec |
last post by:
I need to pass a variable from script1.php to script2.php. The problem
is that these scripts use frames and therefore I am able to pass the
variable through the URL. It also does not use forms to set this
variable, so i cannot pass it this way either.
So to simplify I have :
script1.php
<?php
$var1 = value;
| |
by: David++ |
last post by:
Hi folks,
I would be interested to hear peoples views on whether or not 'pass by
reference' is allowed when using a Web Service method.
The thing that troubles me about pass-by-reference into a WebService is that
essentially we are passing an address of an object which resides on the
'local machine' i.e. a local machine object address....
|
by: tshad |
last post by:
I want to access multiple arguments based on name passed.
For example I have the following asp:textboxes:
BillingAddress1
BillingAddress2
BillingCity
ShippingAddress1
ShippingAddress2
ShippingCity
|
by: Robert Dailey |
last post by:
Hi,
I noticed in Python all function parameters seem to be passed by
reference. This means that when I modify the value of a variable of a
function, the value of the variable externally from the function is
also modified.
Sometimes I wish to work with "copies", in that when I pass in an
integer variable into a function, I want the...
|
by: Bryan Parkoff |
last post by:
I write my large project in C++ source code. My C++ source code
contains approximate four thousand small functions. Most of them are
inline. I define variables and functions in the global scope. The global
variables and global functions are hidden to prevent from accessing by the
programmers. All global functions share global variables....
|
by: raylopez99 |
last post by:
Keywords: scope resolution, passing classes between parent and child
forms, parameter constructor method, normal constructor, default
constructor, forward reference, sharing classes between forms.
Here is a newbie mistake that I found myself doing (as a newbie), and
that even a master programmer, the guru of this forum, Jon Skeet,
missed!...
|
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...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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. ...
|
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...
|
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...
|
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...
|
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...
| |
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |