Author Topic: Better Method - point in the right direction  (Read 512 times)

0 Members and 1 Guest are viewing this topic.

Offline gevensenTopic starter

  • Enthusiast
  • Posts: 195
    • View Profile
Better Method - point in the right direction
« on: May 15, 2010, 06:44:40 PM »
i have the html code below that creates an ajax call that works
i can pass the data contained in id="update_<?php echo $bank_data[$i][11]?>" which is basically a field named after a file id which contains a date in date form 2010-01-01 for example to a javascript query using get element by id
this creates a button in the same box below the input field which i have to then click to make the query
is there a way to eliminate the button and for example doubleclick on the textbox to make the query?


Code: [Select]
<td width = "75" align = "center" ><input align = "middle" name="date_update" type="text" id="update_<?php echo $bank_data[$i][11]?>" value="<?php echo $bank_data[$i][1]; ?>" />
<button onclick="update_posteddate(<?php echo $bank_data[$i][11]; ?> )">Update Post Date</button>

Offline gevensenTopic starter

  • Enthusiast
  • Posts: 195
    • View Profile
Re: Better Method - point in the right direction
« Reply #1 on: May 15, 2010, 06:47:16 PM »
oops

scratch the question

i had tried it before and i just tried it again and it works

i added the following to the text box and it succesfully passed the data

Code: [Select]
onclick="update_posteddate(<?php echo $bank_data[$i][11]; ?> )"