/    Sign up×
Community /Pin to ProfileBookmark

Update amount of selected item(onChange)

Anybody can help me…I want to display the amaun_seunit when i click the drop down menu…

<select name=”no_rujukan_bil” id=”no_rujukan_bil” onChange=” biAmaunSeunit(this.value,this.form)”>
<option value=”0″>[Sila Pilih]</option>
</select>

<script language=”javascript” type=”text/javascript”>
function biAmaunSeunit(bill_refno,Frm) {
<?php
$Result4 = &$biModel->biListAmaunSeunit($Result3->field[‘bill_refno’]);
?>
var AmaunSeunit = new Array();

// set up the data to be consistent to start with.
document.Frm.no_rujukan_bil.selectedIndex=0;
document.Frm.amaun_seunit.value=AmaunSeunit[0];
var v = document.Frm.no_rujukan_bil.selectedIndex;
var x = document.Frm.no_rujukan_bil[v].value;
//var _y = eval(_x);
document.Frm.amaun_seunit.value = AmaunSeunit[$Result4->field[‘amaun_seunit’]];
}
</script>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMay 24.2005 — More information is needed as to exactly what you're trying to do. I can think of at least three different things to which you might be referring. Also, are you currently encountering any error messages or erroneous output? If so, please describe in full. Thanks.
×

Success!

Help @shmunaz 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 4.30,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...