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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using tab and enter to induce calander

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
Hi
I have the following code which embeds an dhtml calander into my pages:
Code:
<tr>
  <td><b>Date</b></td>        
  <td><input type=text name=day value=<#entrydate> size=&quot;12&quot;>
                   <img src=&quot;<#HostAddr>/icons/show-calendar.gif&quot; width=15 height=15 border=0 id=&quot;trigger1&quot;>
  </td>
             <script type=&quot;text/javascript&quot;>
                 Calendar.setup(
                 {
                     inputField  : &quot;day&quot;,      // ID of the input field
                     ifFormat    : &quot;dd/mm/y&quot;,    // the date format
                     button      : &quot;trigger1&quot;    // ID of the button
                 });
             </script>
        </tr>

I need to modify this code so that the image is included in the tabbing across my form.

To do this, i wrapped the image in <a href> like so:
Code:
 <a href=&quot;&quot;><img src=&quot;stuff&quot;></a>

But the calander does not work when tabbing and hitting enter to envoke calander.

I know the solution is probably simple.. can anyone tell me what it is? It is possible of course that i will need to change the calander.setup() function which will be a posting to javascript, but i thought i would try html first...

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
And, as I so often do, I answer my own question 5 seconds after hitting post.

I removed id=&quot;trigger1&quot; from the img and added it to the a tag.

works lovely
sorry for wasting forum space

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top