C
csriram
I have 2 panels on the same form (PanelNew and PanelUpdate),
1) Only one of them is visible at any time based on the operation
(add/update)
2) PanelNew has a wizard control with 4 steps named
WizardTripTikOrderEntry
3) PanelUpdate has a radio button list for search criteria and a find
button that uses the text typed in a search text box to retrieve
records based on criteria chosen in radio button list
4) If PanelNew is visible, WizardTripTikOrderEntry is visible; if
PanelUpdate is visible btnFind is visible - those are the two controls
I want to trap the enter key for
I trapped the enter key for the find button just fine using the
following client side javascript. But when I did the same for the
Wizard control, it did not work.
<body onkeydown="return catchEnter();">
</script>
<script type="text/javascript" >
function catchEnter()
{
if (event.keyCode == 13)
{
__doPostBack('<%=WizardTripTikOrderEntry.ClientID%>',"");
__doPostBack('<%=btnFind.ClientID%>',"");
return false;
}
else
{
return true;
}
}
</script>
How can I
1) Get the enter key trapped correctly for the wizard control and
initiate the move to the next step? Can I use an invisible button
inside a StepNavigationTemplate or is there any other way? I have so
many controls (about 40 of them) already coded in the NextButtonClick
and ActiveStepChanged events that I do not want to re-do the entire 4
steps with templated controls.
2) Have the enter key trapping occur only when the server side control
is visible (either button or wizard control but not both)?
PLEASE HELP.
Chad
1) Only one of them is visible at any time based on the operation
(add/update)
2) PanelNew has a wizard control with 4 steps named
WizardTripTikOrderEntry
3) PanelUpdate has a radio button list for search criteria and a find
button that uses the text typed in a search text box to retrieve
records based on criteria chosen in radio button list
4) If PanelNew is visible, WizardTripTikOrderEntry is visible; if
PanelUpdate is visible btnFind is visible - those are the two controls
I want to trap the enter key for
I trapped the enter key for the find button just fine using the
following client side javascript. But when I did the same for the
Wizard control, it did not work.
<body onkeydown="return catchEnter();">
</script>
<script type="text/javascript" >
function catchEnter()
{
if (event.keyCode == 13)
{
__doPostBack('<%=WizardTripTikOrderEntry.ClientID%>',"");
__doPostBack('<%=btnFind.ClientID%>',"");
return false;
}
else
{
return true;
}
}
</script>
How can I
1) Get the enter key trapped correctly for the wizard control and
initiate the move to the next step? Can I use an invisible button
inside a StepNavigationTemplate or is there any other way? I have so
many controls (about 40 of them) already coded in the NextButtonClick
and ActiveStepChanged events that I do not want to re-do the entire 4
steps with templated controls.
2) Have the enter key trapping occur only when the server side control
is visible (either button or wizard control but not both)?
PLEASE HELP.
Chad