/    Sign up×
Community /Pin to ProfileBookmark

How to create event when AutoSuggest should set <select> element

i have an autosuggest event to display data to input field like this

[code=html]
function display_sn(sn_code, nation_name, supp_desc, sStartDate, sEndDate){
document.getElementById(‘nation_name’).innerHTML = nation_name;
document.getElementById(‘supp_desc’).innerHTML = supp_desc;
document.getElementById(‘sStartDate’).innerHTML = sStartDate;
document.getElementById(‘sEndDate’).innerHTML = sEndDate;
document.getElementById(‘sn_code’).value = sn_code;
document.getElementById(‘box_sn’).style.display = ‘none’;
}
[/code]

and i would like to set an <select> element to add onChange properties like this

[code=html]
onChange=”document.getElementById(‘row_pop_date’).style.visibility = ‘visible’; document.getElementById(‘row_upload_pop’).style.visibility = ‘visible’;”
[/code]

so, when i clicked on my autosuggest, the select would be like this

[code=html]
<select name=”warranty_flag” onChange=”document.getElementById(‘row_pop_date’).style.visibility = ‘visible’; document.getElementById(‘row_upload_pop’).style.visibility = ‘visible’;”>
[/code]

so how the command from that function to set onChange parameter at <select>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@lord_aragonauthorJun 12.2009 — does anyone know what the solution ?
×

Success!

Help @lord_aragon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.12,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...