Hi EveryBody,

I am trying to create new module using drupal 5. In the new custom module, one of the pages I have two drop down lists to be provided. One for Country and other for State. When a Country is selected from the Dropdown list, then I need to have the second dropdown list populated with the list of States corresponding to that country dynamically. I have been using AJAX to implement this. I am aware that the coding done for creating modules in Drupal varies from the normal php coding done across the nodes. However, I have been facing an issue regarding this , in which I have been stuck for a while now. Let me explain;

As of now, the status is,
- I have Country dropdown populated with the list of Countries.
- 'Change' event for this drop down calls the appropriate js function where I am able to retrieve the value of the option selected.
- As known, we have a url mentioned in this js function which contains the path for the function which actually performs the actions based on the
retrived value of first drop down. This is where i am stuck. Somehow, I am not able to pass on the value of selected option, to the function that is
called through the url.
The code I have been working with, is shown below

if (Drupal.jsEnabled) {
$(document).ready( 
		function() {
 			$('#edit-country').change(  
					function()  { 
						// make an AJAX callback to look up the State options..
						$('#state-options').load('/foo/stateoptions', { states: $('#edit-country').val() } );
                                      	        alert($('#edit-country').val() ); 
					} 
			);
		}
          );
}

Please help me overcome this issue.

Thanks in advance
Kumareshan.E