Created
November 9, 2013 17:45
-
-
Save mhenke/7387847 to your computer and use it in GitHub Desktop.
awesome js function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function populateForEventProspectAdd () { | |
$('#CM_Name_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_company_name.value); | |
$('#IM_First_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_first_name.value); | |
$('#IM_Last_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_last_name.value); | |
$('#IM_Address1_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_address1.value); | |
$('#IM_Address2_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_address2.value); | |
$('#IM_City_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_city.value); | |
$('#IM_State_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_state.value); | |
$('#IM_Zip_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_zip.value); | |
$('#IM_Zip4_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_zip4.value); | |
$('#IM_Phone_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_phone.value); | |
$('#IM_E_mail_' + document.FindCorporateMember.WhatRowAmIOn.value).val(document.EventProspectAdd.I_email_address.value); | |
// Set the Value to the concatenated string: #IM_ID#_#Name_ID#_#Link_ID#_#CM_ID## | |
selectValue = '0_0_0_0'; // Company and Person does not exist so everything should be 0's at this point | |
SelectName = document.EventProspectAdd.I_first_name.value + ' ' + document.EventProspectAdd.I_last_name.value + ' - ' + document.EventProspectAdd.I_company_name.value; | |
SelectRegistrantOutsideCompany ( selectValue, SelectName ); | |
$("#prospect-dialog").dialog("close"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
document.EventProspectAdd is called at least 11 times, please put this in a var so it doesn't have to go into the dom each time