send name="" in jquery javascript?
Posted
by Azzyh
on Stack Overflow
See other posts from Stack Overflow
or by Azzyh
Published on 2010-06-13T20:33:30Z
Indexed on
2010/06/13
20:42 UTC
Read the original article
Hit count: 158
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?
© Stack Overflow or respective owner