hi,
i am using php, javascript, ajax in my Timesheet project.
I made a grid displaying details of Timesheet such as Date, Day, Starttime, Endtime etc.
i coded this grid using table, input tag and displayed it in php.
i have used input tag name as array and i want to retrieve that value in javascript.

example:
<?php
for($i=1;$i<=$days;$i++)
{
$display_string .= "<td><input type='text' name='date[$i]' value='$dat' > </td>";
$display_string .= "<td><input type='text' name='day[$i]' value='$day' > </td>";
$display_string .= "<td><input type='text' name='stime[$i]' > </td>";
$display_string .= "<td><input type='text' name='etime[$i]' > </td>";
}
echo $display_string;
?>

How to get the value of input tag array value in javascript?

If anybody knows it, pls help me.

Thanks,
Yasodha.

Member Avatar for fatihpiristine

if (document.getElementById)
{
document.getElementById();
}


now you know what you have to look for.

hi fatihpiristine,
if i am not using arrays in input tag program is working fine,

i have used this getElementById() also.
i am in need of the exact code , can u ?

Thanks for ur reply.

Yasodha.

Member Avatar for fatihpiristine

well. i m working on sql script since morning without any break... when i finish.. i will post the code you need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.