Jump to content

Fuction needs to return to home page after being invoked

Recommended Posts

there is no need to supress popups :) you need to use popupActivityWithURL for analyst role and display_new_page for employee.

BTW after supressing popups what happening when you save the chenges? Does browser navigate to home screen or back to request?

Share this post

Link to post
Share on other sites

Sorry that is what I meant. I have tried using both  popupActivityWithURL & display_new_page on my employee role.

I noticed that I was currently using the former, on my latest attempt at getting the employee page working. I have now switched back to display_new_page; its still dropping me back to the request, and not the home page.

I've noticed that other 'update status' activities (for example - when the user requests close) forces the status change to update the screen. Is there part of the code that can be 'hijacked' for my button to do the same? I'm not actually sure what part of the page calls the screen refresh, whether it's part of the function itself, or java-script or what part of the actual code calls the page re-fresh.(My colleague here is also stumped, he is a bit more 'webpage savvy' than myself and tried your recommended changes above on our test system, with the same results to what we get on live. )


Share this post

Link to post
Share on other sites

Is there part of the code that can be 'hijacked' for my button to do the same?

not sure how to do this for employee role, but:


its still dropping me back to the request

that's the reason why I asked for full JavaScript function you use to open new page.

You need to pass some extra param to URL to make status change form know where to navigate you and I have tested code from this post: 

and it works in my env... 


For more information could you open Status change form, then hit F12 to open browser's console and paste followed code then give result back:

console.log("HTMPL : " + ahdframe.jq("[name=HTMPL]").val());
console.log("HOME ACTION : " + ahdframe.jq("[name=KEEP.HOME_ACTION]").val());
console.log("URL : " + ahdframe.window.location.href); // You can wipe site name from this line but keep everything after "?" sign

Regards, cdtj

  • Like 1

Share this post

Link to post
Share on other sites

Hi; so I finally resolved this via a different approach; appreciate all your assistance but I think our pages were too heavily customised for the proposed process to work correctly at our end.

I got it working by adapting the employee; update status page as follows:

     <PDM_MACRO name=button caption="Approve Request" disabled="defer" func="detailSave()" hotkey_name="Save" id="btn001" width=0>

     <PDM_MACRO name=button caption="Cancel" disabled="defer" func="detailCancel()" hotkey_name="Cancel" id="btn002"    width=0>

     <PDM_MACRO name=button caption="Clear Remarks" disabled="defer" func="document.main_form.reset()" hotkey_name="Clear Remarks" id="btn003" width=0>

     <PDM_MACRO name=btnEndRow>

     <PDM_MACRO name=dtlStart>


     <input type=hidden name=SET.status value="PRBAPP">

     <script language="JavaScript">

     add_date_field("alg.time_stamp", "$args.alg.time_stamp_INT_DATE");

     <PDM_MACRO name=dtlStartRow>

     <PDM_MACRO name=dtlReadonly hdr="Current Status" attr=status>

     <PDM_MACRO name=dtlStartRow>

     <PDM_MACRO name=dtlTextbox hdr="Please enter reasons for approval" attr=alg.description colspan=3 keeplinks=yes rows=8 size=80 spellchk=yes>

     <PDM_MACRO name=dtlEndTable>

My new custo drives the status changes from the save button action; and I have created 3 of these called from my previous links. The base code behind the update status page seems to include the base code to call the page refresh upon save and thereby solves the problem I was experiencing.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now