Hi all,
beforehand i'd like to sorry for my English :\
I'm trying to get selected shipping method with jquery, but its not working. Think that its because the shipping methods are generated with jquery, cause when i use code below, it works only for payment methods, but they have the same class "form-radio" like shipping one.
$(document).ready(function(){
$("input.form-radio").click(function(event){
alert("Clicked");
});
});I tried to place button "Get shipping method" witch is placed at the top of the checkout page, and it works:
<input type="button" value="GET shipping method" onclick="alert($('input[@name=quote-option][@checked]').val())"/>but i need to get the shipping method when i click (select, check) the radio button, cause i want to hide some payment methods witch are not valid when using specific shipping method.
E.g.: When i choose "In store pickup", i dont want the "COD method" (called "Dobírka" on my site) - its nonsence.
I tried to use this code, but it didnt work:
$(document).ready(function() {
var pokus = $("input[@name=quote-option]").click(function() {
var choosed = $("input[@name=quote-option]").val();
alert(choosed);
});
});I found here on the forum, that it is not possible to show payment methods based on selected shipping method, but think that its possible to do something like:
adding "hide" class to specific payment methods when specific shipping method is checked.
Its very important for our background - Czech Republic, cause COD is our most offen payment method, so for users its very confusing and unusable in essence.
The site is here: DEMO Ubercart.cz.
I use Ubercart 5.x-1.6 and Drupal 5.12 - the site is thoroughly updated.
Thanx all





Joined: 11/14/2008