Welcome Guest, Not a member yet? Register   Sign In
one dropdown appears on the selection of other
#1

[eluser]Blue_rose[/eluser]
Hey everyone, I am trying to create dynamic dropdown of category and on selection of this category sub-category dropdown should appear. I have done this using OOP PHP but really having tought time with codeignitor.

Firstly I have created this category dropdown
Code:
<?php
$js =' onChange="callAjaxFunction(this.value)"';
echo form_dropdown('category', $categories, null, $js); ?>

Javascript to show sub-category
I was not allowed to post here.

But this is not working. As you can see ajax_category.php is not being able to pass. I think it should be done with controller, I had tried that also but nothing seems as working. I am really stuck with this. Please anyone with little help. Really getting depressed with it Sad.
Many many thanks in advance.
#2

[eluser]Piter[/eluser]
Show HTML output in dropdown ?
#3

[eluser]Blue_rose[/eluser]
No actually there is two dropdowns, one is category dropdown and when you select any category then all the sub-category related to it should only appear on the sub-category.
How to do this in codeignitor????
#4

[eluser]CroNiX[/eluser]
It's javascript and really has nothing to do with CodeIgniter (or PHP).

Search Google for "javascript dependant select"




Theme © iAndrew 2016 - Forum software by © MyBB