BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Webbroker with Ajax

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
Mark Horrocks
Guest





PostPosted: Sat Mar 31, 2007 8:11 am    Post subject: Webbroker with Ajax Reply with quote



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'Mad,'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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.