Hi guys,
I am new for this forum, i also don't anything about perl. I know little bit PHP and scripiting language.
Problem is that i want to modify OTRS code in page AgentITSMChangeEdit.dtl file in case of state change . i want to implement some functionality there on change event..
but i don't know how can i insert onchange event there. I can see that they displaying data by $data["StateSelectionString"] and they store data in AgentITSMChangeEdit.pm file, i have to insert onchange event here ( this could be better if some one tell me how to add onchange code directly in AgentITSMChangeEdit.dtl file )
this is piece of code
1. AgentITSMChangeEdit.dtl : - <td class="contentvalue">$Data{"StateSelectionString"}</td> (displaying data in drop down )
2. AgentITSMChangeEdit.pm : - making drop down
if ( $Self->{Config}->{ChangeState} ) {
# get change state list
my $ChangePossibleStates = $Self->{ChangeObject}->ChangePossibleStatesGet(
ChangeID => $ChangeID,
UserID => $Self->{UserID},
);
# build drop-down with change states
my $StateSelectionString = $Self->{LayoutObject}->BuildSelection(
Data => $ChangePossibleStates,
Name => 'ChangeStateID',
SelectedID => $GetParam{ChangeStateID},
# show state dropdown
$Self->{LayoutObject}->Block(
Name => 'State',
Data => {
StateSelectionString => $StateSelectionString,
},
);
}
some where here I need to add onchange event just alert("hi");
Please let me know if any one know how to do this ?
Thanks in advance
onchange event
-
- Znuny newbie
- Posts: 4
- Joined: 23 Feb 2011, 07:03
- Znuny Version: 2.0.4