I am working a school related project and have created a form from where a student can choose a course from drop down and when he choose a course then two drop down will be activate one for credit and another for day/time.
Everything in one form and information will come from mysql database.
Anybody tell me plz the logic and code templete.
plz help me
drop down issue
Page 1 of 14 Replies - 1697 Views - Last Post: 30 May 2006 - 05:54 AM
Replies To: drop down issue
#2
Re: drop down issue
Posted 29 May 2006 - 10:02 PM
Are you wanting help in getting the course info from a database and outputting a form? Or are you wanting help in how to accomplish the form in HTML/Javascript?
#3
Re: drop down issue
Posted 29 May 2006 - 11:02 PM
Here is my code. to select course another drop down will day/time apper....
Any idea
Any idea
//select quiry for main drop down
function setCrList()
{
$quer2=mysql_query("SELECT DISTINCT coursec,courseId,coursecr FROM course_info order by coursec");
while($noticia1 = mysql_fetch_array($quer2))
{
echo "<option value='$noticia1[coursecr]#$noticia1[coursec]'>$noticia1[coursec]</option>"."<BR>";
}
}
<script language="javascript">
function setCredit(txtobj,txt)
{
var mystr=new String(txt);
var arrStr;
arrStr=mystr.split("#");
txtobj.value=arrStr[0];
}
</script>
<select name='cc[]' id="cc[]" onchange="setCredit(cr0,this.value)">
<option value=''>Select one</option>
<?php
setCrList();
?>
</select>
#4
Re: drop down issue
Posted 30 May 2006 - 12:20 AM
When a student select course from first drop down then credit from second drop down appear onchange='set credit()' but day/time from third drop down doesent appear...any idea????
#5
Re: drop down issue
Posted 30 May 2006 - 05:54 AM
This is a HTML/javascript question. Moving topic.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote



|