Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: passing variables between browser and server


Message #1 by wschenk@s... on Thu, 30 Aug 2001 22:05:26
I have a question about an errata in Professional Active Server Pages 3.0:



BEGIN ERRATA-----------------------------------------------------------

Using RUNAT=CLIENT in a SCRIPT Element 

Note that in Windows 2000 RC2, the ASP interpreter will not allow the

RUNAT attribute in a SCRIPT element to be set to CLIENT. 



Using SCRIPT RUNAT=CLIENT produces the error message:



Active Server Pages, ASP 0120 (0x80004005)

Invalid Runat attribute

The Runat attribute of the Script tag or Object tag can only have the 

value 

Server. 

END ERRATA---------------------------------------------------------------



Basically, the author was trying to demonstrate how to create client side 

code on the server by embedding an ASP script ('<%' and '%>') using 

Response.Write statements inside a client side script.

I haven't been able to make it work. Basically, the overall idea is that I 

want to pass variables back and forth between the client and server.

Secrecy is NOT an issue so I could use hidden fields without a problem.

The front-end will (eventually) be a DHTML application, the server side 

will be a IIS application.

Anyone has any ideas about how to make this work efficiently?



Thanks.
Message #2 by Kyle Burns <kburns@c...> on Thu, 30 Aug 2001 16:21:17 -0500
If secrecy is not an issue, then I'd say use hidden input fields and save a

lot of headaches.



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...



-----Original Message-----

From: wschenk@s... [mailto:wschenk@s...]

Sent: Thursday, August 30, 2001 5:05 PM

To: ASP components

Subject: [asp_components] passing variables between browser and server





I have a question about an errata in Professional Active Server Pages 3.0:



BEGIN ERRATA-----------------------------------------------------------

Using RUNAT=CLIENT in a SCRIPT Element 

Note that in Windows 2000 RC2, the ASP interpreter will not allow the

RUNAT attribute in a SCRIPT element to be set to CLIENT. 



Using SCRIPT RUNAT=CLIENT produces the error message:



Active Server Pages, ASP 0120 (0x80004005)

Invalid Runat attribute

The Runat attribute of the Script tag or Object tag can only have the 

value 

Server. 

END ERRATA---------------------------------------------------------------



Basically, the author was trying to demonstrate how to create client side 

code on the server by embedding an ASP script ('<%' and '%>') using 

Response.Write statements inside a client side script.

I haven't been able to make it work. Basically, the overall idea is that I 

want to pass variables back and forth between the client and server.

Secrecy is NOT an issue so I could use hidden fields without a problem.

The front-end will (eventually) be a DHTML application, the server side 

will be a IIS application.

Anyone has any ideas about how to make this work efficiently?



Thanks.

 




$subst('Email.Unsub')

Message #3 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 10:23:50 -0500
Walter,

I've thrown this back into the list because the questions that you have may

pertain to more people and we can help more people by leaving the

conversation for the archive.



I'm not sure exactly what you're asking for, but I'll take a guess and let

you tell me if this isn't what you need.  If you want variables from the

server to be used in client side script, then you have to use those

variables while dynamically building your script.  It's important to

remember that with web technology there is no connection between the client

and server other than the client requesting a page and the server fulfilling

the page request.  That said, you could do something like this to pass a

variable:



'server to client script

<SCRIPT LANGUAGE="javascript">

	//pass the server variable to the client script

	var myServerVariable = <% = variableOnTheServer %>;

</SCRIPT>



=================================

Kyle M. Burns, MCSD

ECommerce Technology Manager

Centra Credit Union

kburns@c...





-----Original Message-----

From: Walter Schenk [mailto:walter@s...]

Sent: Thursday, August 30, 2001 4:43 PM

To: 'kburns@c...'

Subject: FW: [asp_components] RE: passing variables between browser and

se rver





Kyle,



thanks for your response. I am a newbie to asp and am still trying to find

my way around. My basic question is how do I move variables back and forth

between the browser and the ASP server? I have done of books that I am

reading but have not been able to find the answer. Any pointers?



Walter Schenk

SoluTech



-----Original Message-----

From: Kyle Burns [mailto:kburns@c...]

Sent: Thursday, August 30, 2001 2:21 PM

To: ASP components

Subject: [asp_components] RE: passing variables between browser and

server





If secrecy is not an issue, then I'd say use hidden input fields and save a

lot of headaches.


  Return to Index