...

View Full Version : Communicate with server durin run time



jaywhy13
01-28-2005, 04:09 AM
I know that ASP is a server side language... but is there a way to like communicate with the server During run time.....

Like to get application data and session data?

Without reloading the page or refreshing?

And if so... what are the risks of doin summin like that?

fractalvibes
01-28-2005, 05:31 AM
Joe user clicks a link to somepage.asp
Request goes to the IIS server hosting this page.
Server sees that it is an ASP page.
Server hands request off to the handler for ASP
ASP.dll or whatever it is called processes the code in the ASP page and
returns the resultant HTML output to the Server.
Server sends the resultant HTML output to the browser elsewhere on the Globe.

HTTP is a stateless protocol - the server just sends stuff as requested and forgets about the requestor.

If you need more info after the first request, you post back to the server with appropriate instructions. To get back to application or session data
you are going to have to post back - ASP is all running server-side - once it gets to the client all you have is javascript to work with it, and that is all local to the client's browser.

I doubt that you can improve much on that chat thing, as it must post back to the server...

fv

jaywhy13
01-28-2005, 05:38 AM
I read all that u said and i completely uderstand... but you lost me a little bit :confused: after u started talkin about "HTTP is a state..... and if I want to ..... i need to repost"


Are you saying that it cannot be done or r u sayin it is possible?

glenngv
01-28-2005, 05:53 AM
You can use javascript to make remote calls to the server without refreshing the page. See this demo (http://www.ashleyit.com/rs/jsrs/select/php/select.php). Here's more info on Javascript Remote Scripting (http://www.ashleyit.com/rs/).

jaywhy13
01-28-2005, 06:00 AM
hey thanks.... i'll check it out

fractalvibes
01-28-2005, 06:14 AM
Yeah, but any way you look at it - you still have to go BACK TO THE SERVER
for more info than you already have. Unless you saved some things as cookies or hidden form fields - then you are going back to the server to access, one way or the other.

jaywhy13 really needs to learn the ASP paradigm for doing such without other complications methinks. Once that undertanding of how to post back to a page and do things and how to post to another page in the ASP paradigm is
understood, it will all click into place.

fv

jaywhy13
01-28-2005, 12:11 PM
Yeah, but any way you look at it - you still have to go BACK TO THE SERVER
for more info than you already have. Unless you saved some things as cookies or hidden form fields - then you are going back to the server to access, one way or the other.

jaywhy13 really needs to learn the ASP paradigm for doing such without other complications methinks. Once that undertanding of how to post back to a page and do things and how to post to another page in the ASP paradigm is
understood, it will all click into place.

fv

I know that I have to go back to the server but what I'm thinking of doing is going back to the server wthout refreshing the page. I've been trying to find a method to check for new application data and then add it to the page without refreshing anything....

And I have nothing against you telling me what I need to learn... but please if u wish to do so.... u think u could at least point me in the direction I need to go? :rolleyes: U kno like hint, hint.... leave an idea of wot u mean??? :mad:

Holler!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum