View Single Post
Old 01-28-2013, 10:23 PM   PM User | #13
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
In fact, the action= can *NOT* be JavaScript. Period.

Code:
<form action="vote.php" method="post" onsubmit="return submit_vote(this);" >
But if your function submit_vote() still looks like it did in your first post in this thread, then it is COMPLETELY UNNECESSARY!

The browser will *AUTOMATICALLY* encode all your <form> elements for you and will automatically send them as a post-date string when the <form> is submitted.

If you are trying to do this as an AJAX call, then you are going about it all wrong. If this is the case, then show us the code for your make_vote( ) function.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote