treeleaf20 Posted November 13, 2009 Share Posted November 13, 2009 All, I have the following code: var poststr = "statusupdate=" + encodeURI( document.getElementById("statusupdate").value ) + "&user_name=" + encodeURI( document.getElementById("user_name").value ) + "&twitteryes=" + encodeURI ( document.getElementById("twitteryes").checked ) + "¤tstatus=" + encodeURI( document.getElementById("currentstatus").value ); It seems to be failing on the "&twitteryes=" + encodeURI (document.getElementById("twitteryes").checked ) If I remove it, this part works fine. This is the HTML code: <input type="checkbox" name="twitteryes" value="yesplease" /> Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/181394-solved-checkbox-value-with-getelementbyid/ Share on other sites More sharing options...
treeleaf20 Posted November 13, 2009 Author Share Posted November 13, 2009 Nevermind, I'm an idiot. Need to assign and ID to it. Link to comment https://forums.phpfreaks.com/topic/181394-solved-checkbox-value-with-getelementbyid/#findComment-956869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.