Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi folk
i am new to js please help me out.i am creating a field to enter date through js.when i click on calander a calader is opened and i can put date there.but clander is in a row fashion like it is linked to a table and when i will enter date it should store in table row.but for first row it is happening but when i enter in second row then date change reflect on first row date field.give some suggesation or if possible code.for reference i am also sending code for date field.

<form name="bid_date" action="products.php?sub_p_id=<?php print $row_sub_product['sub_p_id'];?>" method="post">
    <div>start date:<input type="text" name="start_date" value="<?php print $row_bid_create['start_date'];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        'formname': 'bid_date',
        // input name
        'controlname': 'start_date'
    });
    </script>
    </div>
    <div>end date:<input type="text" name="end_date" value="<?php print $row_bid_create['end_date'];?>"/>
    <script language="JavaScript">
    new tcal ({
        // form name
        'formname': 'bid_date',
        // input name
        'controlname': 'end_date'
    });
    </script>



here see controlname': 'start_date' this is common for all field so this is not working.so how to make it different for different field.
Posted
Updated 15-May-10 2:16am
v2

1 solution

akhileshwar123 wrote:
how to make it different for different field.


What do you mean? You are creating this code, give it a different id.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900