Jump to content

abelphathost

Members
  • Content count

    4
  • Joined

  • Last visited

About abelphathost

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you so much hey...........the code is perfect.....
  2. abelphathost

    Javascript onsubmit and Checkboxes

    thanks for the response, however I have implemented your suggestion, but am still struggling to get my javascript yield anything positive. I have changed my status field to a dropdown with options such that when a user select a certain option the status will change. I know that I can use a cascading textfield but i wanted a javascript solution. <SCRIPT LANGUAGE="JavaScript"> function Updatestatus() { if (document.getElementById("statuss").value=="Approve") { document.getElementById("status").value="approved"; } else if (document.getElementById("statuss").value=="Undecided") { document.getElementById("status").value="pending"; } document.getElementById("caspioform").onsubmit= Updatestatus; </SCRIPT>
  3. Thanks Mathilda, however am still failing to get any positive result, I have tried to use a drop down list for selection of options but am still stuck. Maybe there is something that I have to do with for my javascript to execute. I am using the following script in my footer area as suggested: <SCRIPT LANGUAGE="JavaScript"> function Updatestatus() { if (document.getElementById("statuss").value=="Approve") { document.getElementById("status").value="approved"; } else if (document.getElementById("statuss").value=="Undecided") { document.getElementById("status").value="pending"; } document.getElementById("caspioform").onsubmit= Updatestatus; </SCRIPT>
  4. Hi everybody, i need to update a field i the database when a checkbox is checked here is my code but it's not working: <SCRIPT LANGUAGE="JavaScript"> function Updatestatus() { if (document.getElementById("approved").checked==true) { document.getElementById("status")="approved"; } else if (document.getElementById("approved").checked==false) { document.getElementById("status")="pend"; } document.getElementById("update as").onsubmit= UpdateQty; </SCRIPT>
×