Jump to content

Form Input Arrays


cesarcesar

Recommended Posts

Im using this Calendar, http://www.calendarxp.net/, on my page. It works great as exampled on the site. My problem comes in when i use the calendar in a form textfield that is an array. I think my *document.this_form.example[]* call is incorrect, but my novice JS knowledge is preventing me from getting it right.

 

Please explain how i can get the calendar to work in the following example. The first textfield call works since it is not in an array.

 

Thanks much.

 

<form method="POST" action="example.php" name="this_form">
<input type="text" id="example_working" name="example_working" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example_working);return false;">
<input type="text" id="example[]" name="example[]" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example[]);return false;">
<input type="text" id="example[]" name="example[]" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example[]);return false;">
<input type="text" id="example[]" name="example[]" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example[]);return false;">
<input type="text" id="example[]" name="example[]" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example[]);return false;">
<input type="text" id="example[]" name="example[]" onfocus="if(self.gfPop)gfPop.fPopCalendar(document.this_form.example[]);return false;">
</form>

Link to comment
https://forums.phpfreaks.com/topic/59673-form-input-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.