From: RobG on
On Jun 24, 8:11 am, Rob Christiansen <robb_christian...(a)q.com> wrote:
> My program is composed of 3 scripts. Script #1 does its thing, then
> Response.Redirects to Script #2,
> which in turn  Response.Redirects to Script #3.

As far as I can tell, you are discussing a server technology (ASP?)
that is off-topic for this group.


> Each script creates
> variables which are passed with the former ones on to
> the next script - it makes for one long, laborious and complicated
> Redirect statement! I was thinking, however,  I could
> instead put all those variables into an object and then simply pass the
> object . Would this work? I tried it, the browser
> recognized it as an object, but I couldn't retrieve any data.
> ---------------------
> CalIOnfo = new Object();
>
> CalIOnfo.filename = "acal"+ fileyear;
> CalIOnfo.databasename = filename +".mdb";    
> CalIOnfo.calendarfile = filename +".htm";  
> CalIOnfo.linkfile     = filename +".rte";  
> CalIOnfo.calendarseek = filename +".htm#"+ month ;  
> CalIOnfo.nextmonth = filemonth;  
> CalIOnfo.nextmonth++;
> if(CalIOnfo.nextmonth == 13 ) CalIOnfo.nextmonth =12;  
> //.
> Response.Redirect("acalen2.asp?CalIOnfo");//  

It seems to me you are expecting an object created on the server to be
available on the client by passing the object's server-side name to
the client.

You may be able to pass the object as text (say a string literal or
name/value pairs) in the URI, then create an equivalent object on the
client using script by processing the text.

But it would be a better idea to include it as an object literal in
the page itself.


--
Rob
From: Sean Kinsey on
On Jun 24, 3:27 am, RobG <rg...(a)iinet.net.au> wrote:
> On Jun 24, 8:11 am, Rob Christiansen <robb_christian...(a)q.com> wrote:
>
> > My program is composed of 3 scripts. Script #1 does its thing, then
> > Response.Redirects to Script #2,
> > which in turn  Response.Redirects to Script #3.
>
> As far as I can tell, you are discussing a server technology (ASP?)
> that is off-topic for this group.

I think it has been discussed before that javascript is what this ng
is about and not /javascript in the browser/, and so javascript on the
server (ASP) is quite legitimate.

>
>
>
>
....
> > Response.Redirect("acalen2.asp?CalIOnfo");//  
>
> It seems to me you are expecting an object created on the server to be
> available on the client by passing the object's server-side name to
> the client.

I'm pretty sure he wants to pass the object between two _server side_
scripts.
From: Sean Kinsey on
On Jun 24, 12:11 am, Rob Christiansen <robb_christian...(a)q.com> wrote:
> My program is composed of 3 scripts. Script #1 does its thing, then
> Response.Redirects to Script #2,
> which in turn  Response.Redirects to Script #3. Each script creates
> variables which are passed with the former ones on to
> the next script - it makes for one long, laborious and complicated
> Redirect statement! I was thinking, however,  I could
> instead put all those variables into an object and then simply pass the
> object . Would this work? I tried it, the browser
> recognized it as an object, but I couldn't retrieve any data.
> ---------------------
> CalIOnfo = new Object();
>
> CalIOnfo.filename = "acal"+ fileyear;
> CalIOnfo.databasename = filename +".mdb";    
> CalIOnfo.calendarfile = filename +".htm";  
> CalIOnfo.linkfile     = filename +".rte";  
> CalIOnfo.calendarseek = filename +".htm#"+ month ;  
> CalIOnfo.nextmonth = filemonth;  
> CalIOnfo.nextmonth++;
> if(CalIOnfo.nextmonth == 13 ) CalIOnfo.nextmonth =12;  
> //.
> Response.Redirect("acalen2.asp?CalIOnfo");//  
>
> crazyswede
>
> *** Sent via Developersdexhttp://www.developersdex.com***

Here you are first declaring an object in javascript, and then passing
a _literal_ string to the next script. There is absolutely no
correlation between the javascript object and the url, except for the
url /coincidentally/ containing the same sequence of characters that
is used to name the javascript variable.

Why aren't you just saving the object in session?

foo.asp
Session("foo") = CalIOnfo;

bar.asp

var CalIOnfo = Session("foo");

From: RobG on
On Jun 24, 6:56 pm, Sean Kinsey <okin...(a)gmail.com> wrote:
> On Jun 24, 3:27 am, RobG <rg...(a)iinet.net.au> wrote:
>
> > On Jun 24, 8:11 am, Rob Christiansen <robb_christian...(a)q.com> wrote:
>
> > > My program is composed of 3 scripts. Script #1 does its thing, then
> > > Response.Redirects to Script #2,
> > > which in turn  Response.Redirects to Script #3.
>
> > As far as I can tell, you are discussing a server technology (ASP?)
> > that is off-topic for this group.
>
> I think it has been discussed before that javascript is what this ng
> is about and not /javascript in the browser/, and so javascript on the
> server (ASP) is quite legitimate.

FAQ 1.2 states:

"However, the majority of questions sent to this group
relates[sic] to javascript in a web browser. If you are
experiencing issues with a particular browser, or the
host is not a browser at all, please make this
information clear."

So questions are assumed to be about javascript in a browser unless
stated otherwise. The OP's question hinted at ASP, but did not make it
clear that the entire process is on the server (if indeed it is).


[...]
> > > Response.Redirect("acalen2.asp?CalIOnfo");//  
>
> > It seems to me you are expecting an object created on the server to be
> > available on the client by passing the object's server-side name to
> > the client.
>
> I'm pretty sure he wants to pass the object between two _server side_
> scripts.

Perhaps you're right, it would have helped if the OP had stated that.


--
Rob
From: Bwig Zomberi on
Sean Kinsey wrote:
> On Jun 24, 12:11 am, Rob Christiansen<robb_christian...(a)q.com> wrote:
>> My program is composed of 3 scripts. Script #1 does its thing, then
>> Response.Redirects to Script #2,
>> which in turn Response.Redirects to Script #3. Each script creates
>> variables which are passed with the former ones on to
>> the next script - it makes for one long, laborious and complicated
>> Redirect statement! I was thinking, however, I could
>> instead put all those variables into an object and then simply pass the
>> object . Would this work? I tried it, the browser
>> recognized it as an object, but I couldn't retrieve any data.
>> ---------------------
>> CalIOnfo = new Object();
>>
>> CalIOnfo.filename = "acal"+ fileyear;
>> CalIOnfo.databasename = filename +".mdb";
>> CalIOnfo.calendarfile = filename +".htm";
>> CalIOnfo.linkfile = filename +".rte";
>> CalIOnfo.calendarseek = filename +".htm#"+ month ;
>> CalIOnfo.nextmonth = filemonth;
>> CalIOnfo.nextmonth++;
>> if(CalIOnfo.nextmonth == 13 ) CalIOnfo.nextmonth =12;
>> //.
>> Response.Redirect("acalen2.asp?CalIOnfo");//
>>
>> crazyswede
>>
>> *** Sent via Developersdexhttp://www.developersdex.com***
>
> Here you are first declaring an object in javascript, and then passing
> a _literal_ string to the next script. There is absolutely no
> correlation between the javascript object and the url, except for the
> url /coincidentally/ containing the same sequence of characters that
> is used to name the javascript variable.
>
> Why aren't you just saving the object in session?
>
> foo.asp
> Session("foo") = CalIOnfo;
>
> bar.asp
>
> var CalIOnfo = Session("foo");
>

The OP does not seem to draw the difference between client-side and
server-side Javascript.

To be on the safe side, like most ASP users, he could try VBscript on
server and JavaScript on the server.


--
Bwig Zomberi