Forums

HDU- A Service Desk User Community :: Forums :: r12 :: Customizations
 
<< Previous thread | Next thread >>
How to set the default value
Moderators: Admin, 4uTech CEO
Author Post
htox
Sat Jan 23 2010, 11:29PM
Registered Member #5440
Joined: Sat Jan 23 2010, 10:19PM
Posts: 2
Hi,

How to set the default value of "Status" with "Closed" as the conditions below? I am a new learner.

1. An Issue of which status is "Open" with the button "Close Issue" in the detail page
2. Click the button "Close Issue" and popup the "issue_status_change.htmpl"
3. In "issue_status_change.htmpl" page the "Current Status=Open" and the "New Status=Open"
4. I just want to set "New Status" to selected the default value "Closed" and leave the "Current Status=Open" when the page loaded.

Would anybody help me? Many thanks.
Back to top
htox
Tue Feb 02 2010, 02:35AM
Registered Member #5440
Joined: Sat Jan 23 2010, 10:19PM
Posts: 2
1. The button code below, the keyword add to URL is {+KEEP.status_type=CL}
var popupURLtk = '$cgi?SID=$SESSION.SID+FID=' + fid_generator() +
'+FACTORY=iss+PERSID=$args.persistent_id+OP=UPDATE+ACTIVITY_LOG_TYPE=ST+KEEP.status_type=CL'+
'+HTMPL=issue_status_change.htmpl';
ImgBtnCreate("CLOSE_REQUEST", "Close Request[R]", "popupActivityWithURL(popupURLtk,'status')",true, 0);
2. Write the javascript function
function loadDefault()
{
if ( "$args.KEEP.status_type" == "CL")
{
document.main_form.elements['KEY.status'].value='Closed';
document.main_form.elements['SET.status'].value='CL';
}
}
3. Call the function when the page loaded.
<BODY onload="loadDefault();">
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

This site is not affiliated with CA. All trademarks are © their respective owners. All other content is © HelpDeskUsers.com and 4uTechnologies, Inc.
4uTechnologies, Inc. reserves the right to content contained within this site.
{THEMEDISCLAIMER}