turning a generated date into a link

admin

Administrator
Staff member
Hi

I use a javascript calendar to place a date into a html form field. The date is displayed in the format dd/mm/yyyy. I wish to create a script that will take what is in that field and convert it to a link eg:

01/04/2003 should convert into a link to pdf/Business_List_01Apr.pdf and so on.

Ideally I would like the submit button on the form to run this script and locate the file pdf/Business_List_01Apr.pdf

Any ideas would be greatly appreciated.

-----
Code pasted below is just for the simple form html page
NB. OnClick command has not yet been set

<HEAD>
<script language="JavaScript" src=http://www.webdeveloper.com/forum/archive/index.php/"date-picker.js"></script>
<title>Input Calendar</title>
</HEAD>
<BODY>

<center>
<form name="calform" Action="">
<a href="javascript:show_calendar('calform.datebox');" onMouseOver="window.status='Date Picker';return true;" onMouseOut="window.status='';return true;"><img src=http://www.webdeveloper.com/forum/archive/index.php/"show-calendar.gif" width=24 height=22 border=0></a>
<input type=text name="datebox" size=15>
<INPUT TYPE=button VALUE="Get Business List" OnClick=GetBusinessList name="butone">
</form>
</center>

</BODY>
</HTML>
 
Back
Top