I am a complete novice in jQuery and javascript, so if this sounds very silly or very simple thing to do please help me out with your expertise
$(document).ready(function(){
$('#add_button').click(function(){
var vol = $('input#cv').val();
var col = $('input#cc').val();
var comment = $('input#co').val();
var sample = $('#cv').attr('class');
var url = $('input#cv').attr('title');
if( (vol && col && comment) == ''){
alert('No data to update');
}else{
url = url.concat('volupdate=',vol,'&concupdate=',col,'&commupdate=',comment,'&sample=',sample);
alert(sample + " " + vol + " " + col +" "+ comment +" " + url);
}
});
});
html :
my $correct_vol = qq{<input type="text" name="cv" id="cv" size="6" class="$sample_name" title="/here/is/where/you/are">};
my $correct_conc = qq{<input type="text" name="cc" id="cc" size="6" class="$sample_name" title="/here/is/where/you/are">};
my $comments = qq{<input type="text" name="co" id="co" size="10" class="$sample_name" title="/here/is/where/you/are">};
my $update = q{<input type="submit" value="Update" id="add_button" class="add_now">};
These forms the last four columns in a big table.
My question is: How should I return the url in jquery function to my perl?
if I use return url what should I expect ? And how should I handle the values passed from the url in my script? Thanks for your suggestions.