I imagine the code for this must be pretty simple, but I am just looking to repeat the value of what is entered into one field on a submission page into another hidden field.
This is what I have so far
<script>
function onSubmitClick() {
var box1 = document.getElementById('InsertRecordsubgoalcount');
var box2 = document.getElementById('InsertRecordgoalcount');
box2.value = box1.value;
}
</script>
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
mark048
I imagine the code for this must be pretty simple, but I am just looking to repeat the value of what is entered into one field on a submission page into another hidden field.
This is what I have so far
<script>
function onSubmitClick() {
var box1 = document.getElementById('InsertRecordsubgoalcount');
var box2 = document.getElementById('InsertRecordgoalcount');
box2.value = box1.value;
}
</script>
<button onclick='onSubmitClick(); return false'>Click Me</button>
Thanks,
Mark
Link to comment
Share on other sites
6 answers 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.