Im trying to implement localization language options with drop-
down menu button...
here my html code.....
<form action=" " >
<select id="category" style="width:226px"
onChange="startRequest();">
<option value="0">Select a language</option>
<[EMAIL PROTECTED] do|key,value|%>
<option value=<%=value%>><%=key%></option>
<!--<option value='ar'>arabic</option>
<option value='hi'>hindi</option>-->
<%end%>
</select>
</form>
when an event fires it call the "startRequest()" method which is
defined in script tags.
<script type="text/javascript">
function startRequest(){
var xhr;
var lan_Id = document.getElementById("category").value;
alert(lan_Id);
var uri_orig = window.location.href;
alert(uri_orig);
new Ajax.Updater('update','get_lang', {
onComplete: function(request){
Element.hide("spinner");
},
parameters: 'lan_Id=' + encodeURIComponent(lan_Id)
})
}
</script>
actually 'get_lang' method is in application controller.
Instead of going to application controller..... it is checking this
"get_lang" method in current controller.("i.e url").
please any one help me regrding this...............
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---