Oracle APEX Select RDS Tab in URL - oracle-apex

I am developing an application in Oracle APEX 5.1. I have a page which uses a region display selector. The default tab has general information which should be the active tab for anyone navigating to the page from within the app. The other tabs are detailed reports which are relevant to specific users. I want to provide these users with a URL to access the tab containing the reports that they're interested in.
I created a page variable, P14_ACTIVE_TAB, which is the static ID of the region associated with a particular tab. I use this variable in the following JavaScript code..
selectTab = "$('#myRDS .a-Tabs').aTabs('getTabs')['#" + $v('P14_ACTIVE_TAB') + "'].makeActive();";
console.log(selectTab);
eval(selectTab);
I have tested the code and it works correctly if I use it on a button, select list, etc. however I have been unable to get it to properly execute when a user navigates to the page using a URL like
f?p=100:14:::::P14_ACTIVE_TAB:myReport
If I define a dynamic action on page load it appears that the page is being rendered after the code is executed so I still get the default tab. If I look at the console output I see the correct code, which I can then cut/paste as a console command to get the desired result. So it appears that I have the right code being executed at the wrong time.
Does anyone have any suggestions how I can define the dynamic action to execute after the page has been rendered so the correct tab will be made active?
Thanks.

Related

Interactive filters set on page load only show up after manual refresh

I am setting up dynamic filters for the IG using new APEX_IG package method add_filter. So from Page 1 I click oin the link to go to Page 2 where I have interactive grid. Through that link I set a couple of page items on page 2 and based on those items I create filters using APEX_IG.ADD_FILTER. So the setting of the filters has to be done on PAGE_LOAD.
On page load I use a DA that calls APEX_IG.ADD_FILTER if a specific page item is not null. When I open the page first time, I do not see the filters applied, they only show up after I manually refresh the page. I added a refresh action for the IG after executing ADD_FILTER but that does not do anything - in order to see the change I still have to manually refresh the page.
I cannot add any refresh action or submit page action under page load since that will refresh the page repeatedly. What is the best way to programmatically refresh the page after applying or removing the filters?
If the issue is just on page load, you could add the call to APEX_IG.ADD_FILTER in a pre-rendering page process instead of a dynamic action. This works fine for me. This blog also explains that a full page refresh is needed.

How to detect a page refresh using javascript on APEX?

My goal is to do some javascript action the moment the user clicks the browser's refresh button.
I've tried:
Function and Global Variable Declaration
function pageunload(){
alert('here');
};
Execute when Page Loads
window.addEventListener('beforeunload', pageunload);
I know that the 'addEventListener' is working properly but the event is not the right one.
I have also tried to dynamic action "before Refresh", but I haven't been able to associate it to the page level, only items/regions etc.
In the page attribute you can write Javascript on Page Load which will be executed when the page is reloaded or submitted.
beforeunload is the opposite of what you want
Use the load event
Check Mohamad image
Create a dynamic action for page Load

Master page showing unexpectedly

When I am clicking on the upload button in document web, inside that the section master page is showing (which should not).
How to remove this either in SharePoint designer or SharePoint 2013 itself?
Also, the site settings is showing up on home page (but it should show in a separate new page).
Screeshots:
It looks like you have a custom master page that is missing much of the core structure of a master page. In particular, an out of the box master page responds to a Query String value of "?IsDlg=1" to control if master page content is displayed in SharePoint dialog boxes along with primary page content.
To see this, go to a site without this custom master page and visit a list or library page. Edit the URL and, if there's no Query String (i.e. no "?" in the URL, add "?IsDlg=1" (no quotes), or if there is a query string add "&IsDlg=1" (no quotes). Notice the difference in the displayed content.
Something is missing from your custom master page. Either the lack of standard CSS classes or missing JavaScript references.
Can you reset the master page back to one of the out of the box master pages and check to see if everything is now working.
As the the Site Settings, someone must of added an IFRAME or a Page Viewer web part to the home page and set the URL to the Site Settings page.

What is the simplest way to create a page tab on the latest version of fb?

All I want to do is create a few pages with sign up forms for our fans and customers on our business facebook page.
I created the new app, named it and went on to the basic settings. From what I can tell I just need to set up the "page tab" info. I Named the tab, put in the page tab url, secure page tab url and uploaded a tab image.
Then I wait for it to show up on our fb page. I refresh the page and for a few seconds it looks like something is being loaded in the list of tabs. But then it stops and the layout of default tabs (photos, likes, and events) are unchanged.
The tab should link to the app url which should load inside of an iframe which will have the html from our web server.
That's how I understand it anyways.
You must add manually the application on your page through this URL: http://www.facebook.com/dialog/pagetab?app_id=APP_ID&redirect_uri=https://www.facebook.com/
Remember to replace APP_ID first.

Adding a Like button to a dynamically generated web page

We have an application that creates web pages dynamically. The user enters a title, some descriptions, some images, etc. and clicks the CREATE button, and Presto! the page is created within our domain and is accessible from any browser by entering
www.ourdomain.com/thenewpagename
This all works fine but now we'd like to add a Like button to the page we create.
I know that the normal way to add Like buttons to a page is to go the Facebook developer's page, enter some information about the page-to-like, like it's URL, and then copy and paste the code that Facebook generates onto the page. But clearly we can't do that for every page that gets generated by our engine. So my thought was to add the Like code from another page and then dynamically change the URL in the code the the URL for the page being generated. But this doesn't work. It puts a Like button on the page, ok, and when you try to Like the page the "Add Comment" field comes up momentarily, but then the Add Comment field disappears and the like count goes back to 0. It acts like Facebook shuts down the button as soon as they saw something fishy.
I'm wondering if anyone sees a way to do what I'm trying to do. Is there maybe a way to generate a new button on the fly for each page we generate by communicating with Facebook with something like cURL?
Thanks for any ideas.
Check if this could be of any help to you : http://www.hostelmanagement.com/facebook_like_button_tutorial.php