Jump to content

Write to table


Recommended Posts

I have a list whose value when there is no item selected is 1. If any item is selected, I want to write "Education" to the field "Program Area". I have been able to display an alert with the message "Education", but it doesn't commit to the table. This is the code that I have:

function writeProgramArea()
{
var fieldName1 = "InsertRecordPoFED";
var x1=document.getElementsByName(fieldName1);
  
if (x1[0].value != "1")

{
   var xProgramArea = document.getElementsByName("InsertRecordProgramArea");
   xProgramArea.value="Education";
alert(xProgramArea.value);   }

}

document.getElementById("caspioform").onsubmit=writeProgramArea;

 

What am I missing?

Thanks!

Eduardo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...