div refresh when onclick

View: New views
2 Messages — Rating Filter:   Alert me  

div refresh when onclick

by sandyg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi All,

I have to refresh a div onclick .
here my code
refresh
am using AJAX

function loadurl(dest) {
try {
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) { /* do nothing */ }

xmlhttp.onreadystatechange = triggered;
xmlhttp.open("GET", dest);
xmlhttp.send(null);

}
function triggered() {
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
document.getElementById("yourDiv").innerHTML = xmlhttp.responseText;}
}
</script>

-------------------------------------

i  dont need to put any response in 'mydiv',innerhtml
because on onclick  httpsession will be updated and if i refresh the div then the source in div will be updated with the session.

PLz send me response asap

Re: div refresh when onclick

by Ilya Shaikovsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

this list is deprecated. use Jboss RichFaces user forum.

sandyg пишет:

> Hi All,
>
> I have to refresh a div onclick .
> here my code
> # refresh
> am using AJAX
>
> function loadurl(dest) {
> try {
> xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
> new ActiveXObject("Microsoft.XMLHTTP");
> }
> catch (e) { /* do nothing */ }
>
> xmlhttp.onreadystatechange = triggered;
> xmlhttp.open("GET", dest);
> xmlhttp.send(null);
>
> }
> function triggered() {
> if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
> document.getElementById("yourDiv").innerHTML = xmlhttp.responseText;}
> }
> </script>
>
> -------------------------------------
>
> i  dont need to put any response in 'mydiv',innerhtml
> because on onclick  httpsession will be updated and if i refresh the div
> then the source in div will be updated with the session.
>
> PLz send me response asap
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...