Hello, well I have been left this question for the end and I was
taking care more of teorical stuff, and making things work in my app.
now, I put a simple AjaxUpdateContainer in my app, following the Ajax
Examples, which provided me with great info, but, each time I select a
day in my calendar (for those who forgot, Im choosing a day in a
calendar and depending on the day, Im showing the turns available for
that day), and the whole page its reloaded, the url passes from :
http://192.168.1.105:1250/cgi-bin/WebObjects/ControlHorarios.woa/wo/UZb0e1BLddiMRcvDv9GAtw/0.24
to
http://192.168.1.105:1250/cgi-bin/WebObjects/ControlHorarios.woa/wo/UZb0e1BLddiMRcvDv9GAtw/2.24
and so on.
i understandd that this shouldnt happen, I have been looking in the
examples but I see I have the main idea as its show in the examples.
What am I doing wrong?
here is the code of the wo.
<div id="container">
<div id="header">
<h1>Registro de Horarios: </h1>
<span style="float:right">Usuario: <webobject name = "Usuario" /
> </span>
<!-- end #header --></div>
<div id="sidebar1">
<script type="text/javascript">
function dateChanged(calendar) {
// Beware that this function is called even if the end-user only
// changed the month/year. In order to determine if a date was
// clicked you can use the dateClicked property of the calendar:
if (calendar.dateClicked) {
// OK, a date was clicked, redirect to
/yyyy/mm/dd/index.php
var y = calendar.date.getFullYear();
var m = calendar.date.getMonth(); // integer, 0..11
var d = calendar.date.getDate(); // integer, 1..31
var date = y+"/"+(m+1)+"/"+d;
// redirect...
//window.location = "/" + y + "/" + m + "/" + d +
"/index.php";
document.getElementById('selectedDate').value = date;
//var frm = document.getElementById('theForm');
//frm.submit();
}
};
Calendar.setup(
{
flat : "sidebar1", // ID of the parent element
flatCallback : dateChanged // our callback function
}
);
</script>
<wo:form multipleSubmit = "$true" action = "$setCalendar" id =
"form1">
<wo:WOTextField id = "selectedDate" value = "$dateSelected"
size= "11" />
<wo:AjaxUpdateLink updateContainerID = "turnsSummary" onClick
= "return submitForm();">Buscar</wo:AjaxUpdateLink>
</wo:form>
<!-- end #sidebar1 --></div>
<div id="mainContent">
<br />
<br />
<webobject name = "Condition">
<wo:WOForm name = "turnsForm" id = "turnsForm" action =
"$registerTurns">
<div id = "mainContentTunrs">
<wo:AjaxUpdateContainer id = "turnsSummary">
<span> <wo:WOString value = "Turns for the selected Day:"/> </span>
<br />
<br />
<webobject name = "SelectCheck">
<webobject name = "Start" /> TO <webobject name =
"End" />
</webobject>
<wo:AjaxHighlight id = "turnsSummary" value = "turnsSummary"
effect="Effect.BlindDown" scaleMode = "contents" duration = "1.0" />
</wo:AjaxUpdateContainer>
<br />
</div>
<div class = "niftyAppt" style = "float:right"> <span
onClick="submitTurns();" onMouseOver="cursor_pointer();"
onMouseOut="cursor_default();">
Submit
</span>
</div>
</wo:WOForm>
</webobject>
<!-- end #mainContent -->
</div>
thanks..
Gsutavo
if something I can just attach the file.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]