jaminxz Posted February 25, 2009 Share Posted February 25, 2009 Hi guys, I have something I need to do which is quite complex for me! i've partly started typing out the code but am tearing my hair out already! i'm not sure if this is even possible so i'm gonna need some advice before i spend another 2 hours on it! ok i have rows from a database being displaid on a php web-page, which are in a form Code: <form action="" method="post" id="Updated_Rows_Form"> each row has a button next to it called close. Code: <input type="submit" ID="<?php echo $row_query4['ID']; ?>" value="Close" onclick="function confirm_delete('<?php echo $row_query4['ID']; ?>')" when this button is clicked, i want to run a javascript function and pass the id of the row in question to it and then do the following actions (please excuse my crude java/pesudo code, i am an ultra newbie!) Code: var form_id; function confirm_delete(ID) { prompt("Close at how many hours?", " <?php echo $TotalHours ?> (note: i want this to be the default but EDITABLE VALUE)"); if(prompt){ var HourClose = inputted data var id = ID <!---- Send these via POST somehow, POST the form --> } } any help would be greatly appreciated as I dont know where to start! Thanks in advance, Jaminxz. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.