send name="" in jquery javascript?
- by Azzyh
Hello
So i have this:
yes: <input type="radio" value="Y" id="SCvoteY" name="vote"></input> no: <input type="radio" id="SCvoteN" value="N" name="vote"> </input>
How do i write that it should transfer name="vote" data ? #vote doesnt work, .vote either (guess it cause thats for class and ID) but what about name then?
function DoSCInsert(){
$("#SCres").html("please wait..");
var nocache = '0';
var data = { fID : $("#fID").val(), vote : $("#vote").val(), comment: $("#comment").val(), nocache: nocache };
$.get('insertSC.php', data, onSCInsertComplete);
}
And how do i shorten this, ive heard that you can you a function in jquery called serialize to pass strings but can you(if you know how) show example by this script how to pass it like this one does?