Thanks a lot for this wonderful generator . I am surprised to see there are no comments for this and not many people viewed it . I am lucky to be the first guy to respond to this video . THANKS A LOT
I have few questions
1) I made this for Country , State and City . But when I select the Country I want state and for the first state all the cities to be populated . Just for country change , I want State and for the first state all the cities to be displayed . I called the state change function even when the Country changed , but that didn't do the trick.
2) While loading is there any way I can choose the default values for Country, State and City . I mean when I hit the page , I want country to be selected by default 'India' and state "Delhi" and city "North Delhi" . Is there any way for this .
Thank you Khammam for the response :) The problem with the 3 listboxes that the first and the second are in connection only, not the third and the first. I have a solution for that which is storing the first selected value in session. But it is quite complicated, the good news is that i'm planning a next generation generator for chained listboxes.
What a immediate response . Thanks for your answer . I am trying to customize the generated code for my purpose ..May be if you have any solutions for customizing my cases , please advise .. I am trying .. let me see
I am able to populate City also based on country selection , below is the code. Pending part is , loading default country,default state and default city.
I am trying to paste the code I did , but it is not allowing sorry for that ..
Hi , If I change jquery.js to the current jquery version which is jquery-1.5.1.min.js . The JSON call is not working . Could you please help me on that ?
I added .error(function() { alert("error"); }) after the getJson call and see it is throwing error . So for latest JQUERY, JSON the result format we are sending it from select.php needs to be changed looks like .. Not sure ..
Wonderful code.. Thank you.. Have a question: In three level list, imagine you select from first, then second and it populates 3rd level. It is ok. But when we changed 1st level, it only clear the second level but third level stands alive. How we can correct this?
Thanks a lot for this wonderful generator . I am surprised to see there are no comments for this and not many people viewed it . I am lucky to be the first guy to respond to this video . THANKS A LOT
VálaszTörlésI have few questions
1) I made this for Country , State and City . But when I select the Country I want state and for the first state all the cities to be populated . Just for country change , I want State and for the first state all the cities to be displayed . I called the state change function even when the Country changed , but that didn't do the trick.
2) While loading is there any way I can choose the default values for Country, State and City . I mean when I hit the page , I want country to be selected by default 'India' and state "Delhi" and city "North Delhi" . Is there any way for this .
THANKS A LOT AGAIN FOR YOUR HELP .
Thank you Khammam for the response :) The problem with the 3 listboxes that the first and the second are in connection only, not the third and the first. I have a solution for that which is storing the first selected value in session. But it is quite complicated, the good news is that i'm planning a next generation generator for chained listboxes.
VálaszTörlésWhat a immediate response . Thanks for your answer . I am trying to customize the generated code for my purpose ..May be if you have any solutions for customizing my cases , please advise .. I am trying .. let me see
VálaszTörlésI am able to populate City also based on country selection , below is the code. Pending part is , loading default country,default state and default city.
VálaszTörlésI am trying to paste the code I did , but it is not allowing sorry for that ..
could you send to my email please: djjjozsi@gmail.com , thanks.
VálaszTörléssent you the code
VálaszTörlésThanks :)
VálaszTörlésHi , If I change jquery.js to the current jquery version which is jquery-1.5.1.min.js . The JSON call is not working . Could you please help me on that ?
VálaszTörlésYou should try not the mini version from Jquery.
VálaszTörlésThanks for your quick response . Other than the Jquery file your provided , mini or development version both are not working :)
VálaszTörlésI added .error(function() { alert("error"); }) after the getJson call and see it is throwing error . So for latest JQUERY, JSON the result format we are sending it from select.php needs to be changed looks like .. Not sure ..
VálaszTörlésI am able to resolve the issue by changing below code in select.php . This is working great for new JQUERY version
VálaszTörlésif (mysql_num_rows($res) > 0) {
while ($a = mysql_fetch_assoc($res))
$data[] = array(
'optionValue' => $a[$id],
'optionDisplay' => $a[$field]
);
return json_encode($data);
}
i will re-write the generator according with this code.
VálaszTörlésThanks You
VálaszTörlésWonderful code.. Thank you.. Have a question: In three level list, imagine you select from first, then second and it populates 3rd level. It is ok. But when we changed 1st level, it only clear the second level but third level stands alive. How we can correct this?
VálaszTörlés