Hi all,
I have an object named "sitedata". Within it are the followint elements:
- sitedata.txt_Forename = '';
- sitedata.txt_Surname = '';
...and so on.
I have matching input elements:
- <input type="text" id="txt_Forename">
- <input type="text" id="txt_Forename">
...and so on.
How do i write a piece of JQuery so that when "txt_Forename" is updated, it modifies "settings.tct_Forename".. and so on for a given set of inouts??? My best (not working) guess so far is:
- $(function() {
$("form#BookerDetails :input[type=text]").keyup(function(){
settings. + $(this).attr('id') = $(this).val();
alert(settings. + $(this).attr('id'));
});
});
please help!