I am trying to use Javascript to call the value of a field (First_Name),
Then trim this field down to the first letter of field value,
Then write the result back to a hidden database field.
If I can get this accomplished, I will then be able to use the field value within URL parameters to call specific records, whose First_Name field starts with the specified letter.
I am using the following code, with no luck yet:
function getfirst()
{
var firstletter = document.getElementById("InsertRecordFirst_Name").value;
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.
Question
perdman
I am trying to use Javascript to call the value of a field (First_Name),
Then trim this field down to the first letter of field value,
Then write the result back to a hidden database field.
If I can get this accomplished, I will then be able to use the field value within URL parameters to call specific records, whose First_Name field starts with the specified letter.
I am using the following code, with no luck yet:
function getfirst()
{
var firstletter = document.getElementById("InsertRecordFirst_Name").value;
var fl = (firstletter.charAt(0)).value;
document.getElementById("InsertRecordfl").value=fl;
}
document.getElementById("caspioform").onsubmit=getfirst;
Anyone have any suggestions?
Thanks in advance.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.