Welcome Guest, Not a member yet? Register   Sign In
Populate query result to drop down list with Ajax
#2

[eluser]Sumon[/eluser]
Might be a solution: Write full drop down list in searchcontest () function.
Function looks like:
Code:
function searchcontest ($storeid) {
  $query = $this->configmodel->get_contest($storeid);
  $output = Array('contest');
  echo "<select id='contest' name='contest'>";
  foreach ($query->result() as $row){
  $arr = Array('contest' => $row->contest);
  echo '<option value="$row["value"]">$row["label"]</option>'
  }
  echo "</select>";
}
I am confused it might not follow MVC but it shall work.


Messages In This Thread
Populate query result to drop down list with Ajax - by El Forum - 07-02-2008, 12:42 AM
Populate query result to drop down list with Ajax - by El Forum - 07-02-2008, 01:59 AM
Populate query result to drop down list with Ajax - by El Forum - 07-02-2008, 07:27 PM
Populate query result to drop down list with Ajax - by El Forum - 07-02-2008, 11:31 PM
Populate query result to drop down list with Ajax - by El Forum - 07-03-2008, 12:05 AM
Populate query result to drop down list with Ajax - by El Forum - 07-03-2008, 01:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB