>> <bbembi...@lycos.de> wrote in message
>>
[quoted text clipped - 3 lines]
>
>Please give me a little example.
Please state your budget for providing this 'little example'.
Alternately, you might actually demonstrate some effort
at figuring what polilop was saying, with appropriate use
of your favorite search engine, to *avoid* asking stupid
questions.

Signature
Andrew Thompson
http://www.physci.org/
>> <bbembi...@lycos.de> wrote in message
>>
[quoted text clipped - 17 lines]
>
> bye juergen
you will need to learn about AJAX before.
looka at http://www.w3schools.com/ajax/default.asp
or at:
http://www.ajaxtutorial.net/index.php/2006/03/08/simple-ajax-functions-snippets/
Allso look at ajax prototype, might be helpful
here is what i use for simple ajax requests (found it on the web but was
unable to find the page again):
ajaxUpdate( 'display', '/myUpdate.do',
{params:'value='+document.getElementById('myValue').value,async:false,startfunc:'loadingMessage();'
});
elemid=id of element that will receive the return information
url =url of the servlet that will make the update eg. myServletUpdate
options = you put options in{} like this, startfunc is if you need to run a
function before the ajax call.
function ajaxUpdate( elemid, url, options )
{
var params = options.params || "";
var meth = options.meth || "post";
var async = options.mode || true;
var startfunc = options.startfunc || "";
var endfunc = options.endfunc || "";
var errorfunc = options.errorfunc || "";
var req = false;
params = params+"&random="+Math.round(10000*Math.random());
//Enkoding for utf-8 do not use if page allready in utf-8
params=encodeURI(params)
//alert(params);
try {
req = new XMLHttpRequest();
} catch(e1) {
try {
req= new ActiveXObject("Microsoft.XMLHTTP");
} catch(e2) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e3) {
return false;
}
}
}
if( startfunc != "" )
eval( startfunc );
req.open( meth, url+( params != "" ? "?"+params : "" ), async );
req.setRequestHeader( "Content-Type",
"application/x-www-form-urlencoded;charset=UTF-8" );
req.onreadystatechange =
function()
{
if ( req.readyState == 4 )
{
if ( req.status == 200 )
{
hideMessage();
document.getElementById(elemid).innerHTML = req.responseText;
if( endfunc != "" )
eval( endfunc );
return true;
}
else
{
hideMessage();
if( endfunc != "" )
eval( endfunc );
if( errorfunc != "" )
eval( errorfunc );
return false;
}
}
};
req.send(null);
}
Hope this helps.
Lew - 21 Nov 2007 14:25 GMT
<bbembi...@lycos.de> wrote in message
>>>> I would like to call a jsp [sic] in background if that is possible.
>>>> Or are there any other possibilities?
>>> You can do this with AJAX.
...
> you will need to learn about AJAX before.
> looka at http://www.w3schools.com/ajax/default.asp
> or at:
> http://www.ajaxtutorial.net/index.php/2006/03/08/simple-ajax-functions-snippets/
> Allso look at ajax prototype, might be helpful
You don't "call" a JSP in the same sense that you call a method. Also, unless
you are creating HTML for display, you shouldn't use a JSP on the server side,
but a servlet coded directly as a Java class.
JSPs are presentation artifacts; they should contain literally no Java
scriptlet. Java-coded servlets are logic artifacts; they usually should
contain literally no HTML markup.

Signature
Lew
polilop - 21 Nov 2007 20:28 GMT
> <bbembi...@lycos.de> wrote in message
>>>>> I would like to call a jsp [sic] in background if that is possible.
[quoted text clipped - 15 lines]
> scriptlet. Java-coded servlets are logic artifacts; they usually should
> contain literally no HTML markup.
I agree with your statement, that's why i wrote
"url =url of the servlet that will make the update eg. myServletUpdate"
assuming bbembi_de knows about servlets.
bbembi_de@lycos.de - 22 Nov 2007 12:14 GMT
> > <bbembi...@lycos.de> wrote in message
> >>>>> I would like to call a jsp [sic] in background if that is possible.
[quoted text clipped - 22 lines]
> "url =url of the servlet that will make the update eg. myServletUpdate"
> assumingbbembi_deknows about servlets.
This works just perfect!
Thank you very much! I thought I never solve this.
bye juergen