Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update page without refreshing entire page.

Status
Not open for further replies.

LuvASP

Programmer
May 18, 2000
46
US
I have seen a website in action where when something changes in the database the ASP gets updated without getting refreshed. Unfortunately, I have not been able to find anything on the net for this.

I believe this is possible by having an activeX control which contains winsock component download on the client. There is a backend dll which communicates with the ActiveX control. On the ASP end, you can write client-side vbscript code and access events on the ActiveX control. And through DHTML, i.e. iframes, innerHTML one can update certain information on the ASP page without having to refresh the entire page.

Anyone seen this before? Any references, example code?
 
The server side code CANNOT be changed without refreshing the page. By the time the page reaches the client side, the server side code has already done its work and vanished.

If you are talking about changing select boxes and such, that behavior can be created by using html's <iframe> tag to link to another asp page. Iframes can be refreshed without refreshing the entire page and are much simpler than ActiveX.
 
Another option is to hide an iframe in the page and change it's src address to the address of a page that will accept data in the querystring and send it to the db. That way the user won't see the page refresh but your still causing the browser to send data to the server and execute the ASP page. This is also quite handy when you want to do an inline search and search results (though that requires more client-side scripting than a simple submission)

-Tarwn

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
minilogo.gif alt=tiernok.com
The never-completed website
 
Another very simple method is to use the MSXML ActiveX control. Load it from a ASP page dynamically using client side javascript then perform a XSLT transformation into HTML and use element.innerHTML to dynamically replace an existing page fragment with the transformation result.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top