Topic: I can´t Pass Variables from Fancybox To xajax HELP!!!!!!!!!!!!!!!!!!!!

Hello, Am doing a project using the jquery plugin called fancybox (its a lightbox).

Am showing a window and the user fills a textbox and then i want to send the value of the textbox to xajax to process a query.

The problem is that xajax is not receiving the data from my form. Am using the function xajax.getFormValues to pass the html inputs of the form to the xajax.

There are some complications:

_The form is inside an iframe.
_The function to pass the information from my iframe to xajax is called from the main page.

This is what is making it complicated. I´ve spent 4 days trying to find a solution, and before giving up i decided to post it here.

This are my codes:



HTML MAIN PAGE:

<iframe src="plato2.php" id="iplato" name="iplato" scrolling="auto" frameborder="0"></iframe>



Javascript Main Page

function cargar_plato(local,id_plato,plato,desc,precio)
{
    $.fancybox({
    'type' : 'iframe',
    'href' : 'plato2.php?local='+local+'&id_plato='+id_plato+'&plato='+plato+'&desc='+desc+'&precio='+precio,
    'transitionIn'    :    'fade',
    'width'     :    '5',
    'height' :    '3',
    'transitionOut'    :    'elastic',
    'speedIn'    :    '200',
    'enableEscapeButton'    :    'true',
    'easingOut'    :    'swing',
    'overlayColor': '#fff',
    'title'    :    '<a id="linkfancy" href="javascript:guardar_item();" target="iplato">Ordenar</a>'
    });
}

Note:
<a id="linkfancy" href="javascript:guardar_item();" target="iplato">Ordenar</a>
This line shows a button that calls a function stored in my iframe "iplato"


This is the content of the iframe "iplato" the src is "plato2.php"

<?
include('xajax.php');
$xajax->printJavascript("include/xajax/");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>

<form  method="GET" action="plato2.php" name="ordena" id="ordena">
<input type="text" name="txtCantidad" id="txtCantidad" size="2" max="2" maxlength="2" style="text-align:center;" value="">
</form>

<script language="javascript">
function guardar_item()
{   
    xajax_guardar_item(xajax.getFormValues('ordena'));
}
</script>

</body>
</html>


Notes that could help:
_I also tried Method Post.
_If i write manually in the HTML code value="2" to the input text, Xajax receives this value correctly as desired.



This is the function am calling in my file xajax.php

function guardar_item($form)
{
    $cantidad=$form["txtCantidad"];
    $respuesta = new xajaxResponse();
    $respuesta->alert($cantidad);
    return $respuesta;
}


Please if any of you can help me i would be very thankful.
I´ve worked with xajax many times in this project and this is the first time this happens to me.