Application and session Varianbles 
Author Message
 Application and session Varianbles

If it possible to access an application variable from cleint side scripting
I can't get it to work I am using this in Server side code

<%
dim strcon
strcon = application("strconnect")
%>

And somthing similar to this in the client side

<script>
sub text
    dim strcon1
    strcon1  = application("strconnect")
end sub

The Application variable holds the connection string for my database and I
want to use this to access the datatbase fromclient side scripting....

Neil



Sat, 12 Apr 2003 03:00:00 GMT  
 Application and session Varianbles

Response.Write the value of the Application variable as the page is loading
where the script expects it to appear.

<script>
 window.alert("<%=Application("MyVar")%>");
</script>
<

Also don't use Application variables unless you really have to the aren't
good for the servers performance or reliability.

--
Dominic


Quote:
> If it possible to access an application variable from cleint side
scripting
> I can't get it to work I am using this in Server side code

> <%
> dim strcon
> strcon = application("strconnect")
> %>

> And somthing similar to this in the client side

> <script>
> sub text
>     dim strcon1
>     strcon1  = application("strconnect")
> end sub

> The Application variable holds the connection string for my database and I
> want to use this to access the datatbase fromclient side scripting....

> Neil



Sat, 12 Apr 2003 03:00:00 GMT  
 Application and session Varianbles
On Tue, 24 Oct 2000 12:36:41 GMT, "Neil McClimond"

Quote:

>If it possible to access an application variable from cleint side scripting
>I can't get it to work I am using this in Server side code

><%
>dim strcon
>strcon = application("strconnect")
>%>

>And somthing similar to this in the client side

><script>
>sub text
>    dim strcon1
>    strcon1  = application("strconnect")
>end sub

>The Application variable holds the connection string for my database and I
>want to use this to access the datatbase fromclient side scripting....

>Neil

You have to set it into JavaScript, something like:

function SetVariables() {
   var MyVariable = '<%=aspvar%>';

Quote:
}

You can then access these client side.

GB
MCP: +I, SE, SD, DBA
MVP
****************************************************
Think Outside the box!
****************************************************



Sat, 12 Apr 2003 03:00:00 GMT  
 Application and session Varianbles
Thanx I will try that today and see what happens I just love programming in
ASP:-)

Neil


Quote:
> On Tue, 24 Oct 2000 12:36:41 GMT, "Neil McClimond"

> >If it possible to access an application variable from cleint side
scripting
> >I can't get it to work I am using this in Server side code

> ><%
> >dim strcon
> >strcon = application("strconnect")
> >%>

> >And somthing similar to this in the client side

> ><script>
> >sub text
> >    dim strcon1
> >    strcon1  = application("strconnect")
> >end sub

> >The Application variable holds the connection string for my database and
I
> >want to use this to access the datatbase fromclient side scripting....

> >Neil

> You have to set it into JavaScript, something like:

> function SetVariables() {
>    var MyVariable = '<%=aspvar%>';
> }

> You can then access these client side.

> GB
> MCP: +I, SE, SD, DBA
> MVP
> ****************************************************
> Think Outside the box!
> ****************************************************



Sun, 13 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Destroying objects stored in Session / Application

2. Session vs. Application problem

3. session or application level functions?

4. Session and Application Variables in Virtual Directories

5. Sessions and Applications

6. Cross-Application Session Variables

7. Application and Session variables

8. Session/Application variables

9. Accessing IIS4 Application and Session Variables with WSH

10. Session vs. Application problem

11. Destroying objects stored in Session / Application

12. Close an application windows currently in session.

 

 
Powered by phpBB® Forum Software