Var from server to client side 
Author Message
 Var from server to client side

I need to retrieve server date in jscript (no problem) and pass it to client
side of same html or asp page. I have an html/asp page with media player on
it, i need to open a media file by server date (not client date). How can i
do that ?

Many thanks!



Sat, 28 Aug 2004 23:33:33 GMT  
 Var from server to client side
A couple of variations:

<script>
document.write('<% Response.Write("hi from the server side"); %>');
</script>

<%
var serverVar = "hi from the server side";
Response.Write("<scr"+"ipt>\n");
Response.Write("alert('" + serverVar + "');\n");
Response.Write("</scr"+"ipt>\n");
%>

www.aspfaq.com


Quote:
> I need to retrieve server date in jscript (no problem) and pass it to
client
> side of same html or asp page. I have an html/asp page with media player
on
> it, i need to open a media file by server date (not client date). How can
i
> do that ?

> Many thanks!



Sat, 28 Aug 2004 23:52:20 GMT  
 Var from server to client side
In ASP page:

...
<script language="JavaScript" type="text/javascript">
<!--
var serverTimestamp = new Date("<%= String(new Date()) %>");
// Use var here!
// -->
</script>
...

HTH,
Jim Rofkar


| I need to retrieve server date in jscript (no problem) and pass it to client
| side of same html or asp page. I have an html/asp page with media player on
| it, i need to open a media file by server date (not client date). How can i
| do that ?
|
| Many thanks!



Sun, 29 Aug 2004 11:33:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing a server side var to client side block

2. How do I use server-side var in client-side scripts

3. Server access to client side var?

4. How to pass serverside var to client side var

5. store server-side array in client side

6. Client-side Subroutine calling Server-Side Subroutine

7. pass server side vbscript to client side javascript

8. Client side VS server side

9. Client Side + Server Side Scripts

10. Help converting server-side VBScript array into client-side JScript array

11. JScript code for both server side and client side

12. Client side scripting / server side scripting

 

 
Powered by phpBB® Forum Software