Re: one click - two actions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mel wrote:
YES YES! that is exactly what I want.
But I don't know how to do what you are suggesting!
You'll have to read some documentation about AJAX if that's what you want, but thankfully there are some easy AJAX toolkits out there. Of the ones I've tried, I find xajax (xajax.sf.net) to be the simplest. For example, the following is a rough (completely untested) example that illustrates my point:

In your HTML, you could have: <div id="logoDiv"></div> and <div id="textDiv"></div> somewhere...

Then the xajax PHP code:
function twoActions() {
   $xR = new xajaxResponse();
   $xR->addAssign('logoDiv','innerHTML','<img src="images/logo.jpg" />');
$xR->addAssign('textDiv','innerHTML','Here is an explanation of the logo!');
   return($xR->getXML());
}
$xajaxInstance->registerFunction('twoActions');

Then the link:

<a href="#" onclick="xajax_twoActions();return(false);">Logo</a>

jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux