Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php/html/javascript

Status
Not open for further replies.

999000333

Programmer
Nov 20, 2006
39
Hello I have one more question
I wrote a form in html/php where I ask the user to enter the Document Date and a start date, to do so I used a pop up calendar written in javascript here is the code:

<td>Data Doc </td>
<td><input name="DocData" type="text" id="DocData" value="<?php echo $row_DatiDoc['DocData']; ?>" size="10" maxlength="25" />

<script language="JavaScript" type="text/javascript">
<!--
function calendarDocDateCallback(date, month, year)
{
if(date<10) { date = '0' + date; }
if(month<10) { month = '0' + month; }
document.forms[0].DocDate.value = year + '-' + month + '-' + date;
}
calendarDocDate = new dynCalendar('calendarDocDate', 'calendarDocDateCallback', '../js/dynCalendar/images/');
calendarDocDate.setMonthCombo(false);
calendarDocDate.setYearCombo(false);
calendarDocDate.setOffset(40, -40)
//-->
</script>

Now everything works fine if I put this code on ONE input text only when I put the code for the other(Data inizio) input text nothing appears.
Can anyone give me some suggestion on how to fix this conflict problem?

Thanks.
Paola
 
this is a javascript question which would be better addressed to the javascript forum: forum216.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top