[SOLVED] Get Page name and hide button if file doesn't exist |
7/25/2022 2:15:36 AM |
PHPRunner General questions | |
A
asawyer13 authorDevClub member
I am creating a help system for my app. I have created a custom button named Help on my list page for example. What I need is the following, but I don't know how to do it. I want to use the same code in each help button so I need to determine the page name that I'm running. For example my list page url is www.ding.com/employee_list.php. Assuming that's true, I then want to look for a file in the help directory named employee_list.html If it doesn't exist, I want to hide the custom button. If it does exist when the user clicks on the button I want to open the html in another window, by issueing this command But of course don't want to hard code it. Hopefully I didn't totally confuse everyone. Thanks in advance. Alan |
|
![]() |
Admin 7/25/2022 |
I recommend checking Context help in your web applications article. It explains how to build this kind of help system. Also you can see the code in the beginning of AfterAppInit event that determines the current page name. |