Topic: xajax plugin

Hi all, i've made a plugin to change the apperance of standard javascript alert box,
this one i got from dhtmlgoodies, and put it together with xajax as a plugin,
the problem is i don't have place to share the file so if someone could contact with me, i could give him the sources, and he would put that on the net...

Re: xajax plugin

I'm a big fan of the Prototype window class (http://prototype-window.xilinus.com/). The usage is quite simple, but I created an extension to original xajaxResponse class. There is a wrapper for the confirm dialog and a second wrapper for the error dialog.
For most

  function showYesNoDialog($title, $content, $confirmCall)
  {
    $this->addScriptCall('showConfirmDialog', $title, $content, $confirmCall);
  }

  function showErrorDialog($title, $content)
  {
    $this->addScriptCall('showErrorDialog', $title, $content);
  }

The usage from another function is quite simple:

function confirmDeleteContact($id)
{
  $objResponse = new xajaxExtendedResponse();
  //...
  $objResponse->showYesNoDialog('Delete contact', $txt, 'xajax_deleteContact(\'' . $id . '\', listContacts.getSelectedItem())');
  //...

  return $objResponse->getXML();
}

function deleteContact($id, $row)
{
  $objResponse = new xajaxResponse();

  //SQL call to delete contact from DB
  return $objResponse->getXML();
}

Sven

3 (edited by mad_man 2007-05-09 11:46:54 AM)

Re: xajax plugin

ok, thx to steffen i can give the sources here it is.
hmm this prototype look interesting...
first time i thought that it's from scriptaculous, but the one from the scrip....(whatever)... are incompatibile with xhtml sad

Re: xajax plugin

mad_man,

Soon we will have an updated site layout which will include a place to post (links to) plugins.  I'm happy to host plugins for people who do not already have hosting, so you can email me and I'll take care of it.

// Joe

xajax Developer
Connect to me on LinkedIn:
http://www.linkedin.com/in/calledtoconstruct

Re: xajax plugin

well great, i don't have hosting yet, for now i'm working on some javascript and also i'm trying to finaly made my own cms system :)then i'll have hosting ;d