Hi,
i have a problem regarding mys javascript function.
i have several forms which name's like this:
PHP Code:
for($i=0; $i<$period; $i++) { $queryCount= "select appId, appTypeName, appStatName from appointment where appId= '$appId'"; $result= safe_query($queryCount); $num_rows = mysql_num_rows($result); while (list($appId, $appTypeName, $appStatName)= mysql_fetch_array($result)) { print "<form name= \"bookAppointmentc$appId\" id= \"bookAppointmentc$appId\" action= \"../action/bookAppointment.php\" method= \"GET\">"; print "<select name= \"appStatName\" class= \"onProgress\" onChange= \"return changeAppc$appId()\">\n"; ..... print "<a href= \"javascript: submitFormc$appId()\"> Changeaa </a> \n"; } }
since i don't really good at javascript, i create the javascript func like this:
Code:
function bookAppointmentc1()
{
...
}
function bookAppointmentc2()
{
...
}
and so on..
i know it's wrong, but i don't know how to make it right?
or is there any other way in creating the form name in php?
thank's for your attention
|