Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.
Endpoint Management Community Blog

Changing Tab Order in the Edit Incidents Screen

Created: 26 Jul 2006 • Updated: 26 Jul 2006 • 5 comments
John Doyle's picture
0 0 Votes
Login to vote

When you create or edit an incident in the Altiris Helpdesk, pressing the Tab key from the textbox labeled Title: takes you to the control bar when it really should take you to the textbox labeled Comments:. To correct this you will need to edit the WorkItemEdit.ascx user control.

First you should follow the normal procedure for creating a custom console as explained in the Helpdesk Reference manual. Create the custom.config file and redirect the file id="WorkItemEdit" to your custom copy of the WorkItemEdit.ascx file.

Having done all that, open your custom copy of the WorkItemEdit.ascx file with your favourite text editor and locate the FinalizeTemplate subroutine. Scroll down a few lines and just before the line End Sub add the code:

tbTitle.Attributes.Add("onblur","javascript:" + stUBBEdit.GetControl("tbUBBEdit").ClientID + ".focus();")

Save the file. Now when you create a new incident or edit an existing one, pressing the Tab key from the Title textbox will cause the cursor to jump to the Comments Textbox.

Comments 5 CommentsJump to latest comment

John Doyle's picture

I realised only after posting this that I forgot the case where the user is using Shift-Tab to cycle backwards through the controls.

tbTitle.Attributes.Add("onblur","javascript: if (window.event.shiftKey) { " & ibSelectAsset.ClientID & ".focus(); } else { " & stUBBEdit.GetControl("tbUBBEdit").ClientID & ".focus();}")

You might also want to add:
DirectCast(stUBBEdit.GetControl("tbUBBEdit"), Altiris.AppWeaver.TextBox).Attributes.Add("onblur","javascript: if (window.event.shiftKey) { " & tbTitle.ClientID & ".focus(); }")

so that Shift-Tab will move the focus directly from the Comments field to the Title field.

One catch. The onblur is triggered whenever the focus leaves the title field. So if the worker clicks on another control on the page, the focus will still move to the Comments field. Whether this is acceptable is up to you.

+3
Login to vote
John Doyle's picture

I came up with a simpler solution to the problem. Instead of adding the javascript to the WorkItemEdit.ascx template, edit the subUBBEdit.ascx file and add the following lines to the FinalizeTemplate subroutine:

hlBold.Attributes.Add("tabIndex", "-1")
hlItalic.Attributes.Add("tabIndex", "-1")
hlUnderline.Attributes.Add("tabIndex", "-1")
hlHyperlink.Attributes.Add("tabIndex", "-1")
hlImg.Attributes.Add("tabIndex", "-1")
hlColor.Attributes.Add("tabIndex", "-1")

+1
Login to vote
cwallace's picture

Perfect! That's just what I was looking for.

-3
Login to vote
Ewentling's picture

As a HelpDesk user for the past 1.5 years, this has always been a bother. I will be implementing this now that I am the administrator. Thanks!

-5
Login to vote
endo's picture

Hi. My asp.net knowledge is not very good.
I have managed to make som customization and my custom.config file looks like this:

"<?xml version="1.0" encoding="utf-8"?>

My Helpdesk Console

"

Now I want to add the CustomsubUBBEdit.ascx file i have in the custom catalog in my custom.config file. How can this be done?

-7
Login to vote