 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Horrocks Guest
|
Posted: Sat Mar 31, 2007 8:11 am Post subject: Webbroker with Ajax |
|
|
Thanks to Marco Cantu for his excellent white paper and demo at
http://ajax.marcocantu.com/ It is really easy to do Ajax with plain old
webbroker.
You only need the Ajax toolkit here http://www.ajaxtoolbox.com/ here and
some javascript similar to the functions below, one shows a submit and the
other a get. Images submitting forms should not be type submit and need only
an onclick and "<"a href="#" onclick="DoSomething()">".
Your default web page needs only a named construct like <div
id="main-content"></div> at the point where you would replace the HTML using
innerHTML. Thats all there is to it. The effect I get here is like a framed
page without the frames. The header and side nav bar remains in place. See
my newest web site at www.heleneintimates.biz for this stuff in action.
function DeleteCartItem(x,y)
{
AjaxRequest.get({
'parameters':{'sid' ,'cartid':y},
'url':'http://www.heleneintimates.biz/wholesale/wholesale.dll/deletecartitem',
'onSuccess':function(req) {
document.getElementById('main-content').innerHTML =
req.responseText;
}
})
}
function ChangeCustomerPassword()
{
AjaxRequest.submit(changecustomerpwd, {
'onSuccess':function(req)
{document.getElementById('main-content').innerHTML = req.responseText;
}
})
} |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|