Programmatically close browser tab with no Java History using HTML - javascript

Trying to achieve what should be a simple thing:
Backstory:
I operate a popular news website. Every morning we send out a 'News Update Email' to several thousand subscribers.
That news update contains links from a news story summaries contained within the subscribers 'News Update Email' to a full news stories contained on our news website.
Each website full news story contains a Java history 'Back' button which, when the page is accessed from within the website, returns the reader to their previous page.
All good - EXCEPT - when the page is access from a subscribers 'News Update Email' - As there is no 'Previous Page' in Java History, so when the user clicks the 'Back' button (Expecting to be returned to their Email program) - NOTHING HAPPENS - Because Java History is empty.
We continually get messages from Users saying 'Your news story page is not working --- Blar, Blar'
So, what I need to do is find a way to programically close the tab that contains that website news page when its 'Back' button is clicked IF that tab's Java history is empty, else 'Go Back' as normal if Java History not empty.
I KNOW you can only programmically close a tab with Java which has been opened with Java, and therein lies the problem - Email clients don't tend to allow java in HTML emails, so I can't use Java to open a tab & am therefore stuck with .
Example link in Email : button
THEN - Close that tab from within itself:
example 'Back' button in website News Story: Back
Putting aside the need for code to determine if Java History is empty, will the above work on all browsers - or not ??? Or is there a better way???
Thanks in advance.

Related

Problem with Document expired after pressing "back button" in browser

We are using an e-commerce script, which is coded with ionCube technology. In the product catalog we have filters. They are sent via post method. Because of the script I cannot use get - even if I want to.
When the user will try to go to a product details, by choosing one of the filtered products in the catalog, when he tries to go back via back button in browser, he gets Document expired. After clicking the refresh button it shows the right catalog page with all filters which were chosen.
We tried to set this on server:
ini_set('session.cache_limiter','public');
It helps with the above problem, but it corrupts the cart page - everything goes crazy.
I tried many scripts founded in Stack Overflow and in other places on the net, but it won't work.
Please notice that I also cannot use PHP, because of ionCube. When I am trying to add anything in the index.php I get a corrupt notice after the page reload.
Any solution?

Oracle apex mouse dynamic active

We have an application built in Oracle APEX 4.2.6 couple of years ago. We have found a problem with respect to session value. Here is the situation. In the first page, we created a "Interactive Report" with link on the column to open up another window with details for that particular record (or estimate in my case). The link target is set "target="_blank", which means it will open up a new window. This interactive report lists all the estimates that a salesperson is working on. Ideally a salesperson will work on different estimate at a time, so that open up different windows to work with. To create the problem, I have created a sample app in https://apex.oracle.com/pls/apex/f?p=4550:1:106597525107750::::: with username as demouser and pwd as Reston12!
This will log you into the workspace and then run the app "Test DP" (id 126218)
Once you login, click on "List Estimate" on the left hand side, you will see two estimates on page 2. Click on the first estimate and it will open up a new tab (second tab). Look at the session value for P3_ESTIMATE which will be D17-12345 (as I clicked on that particular estimate).
Now the salesperson will go and click on second estimate and we will see another tab (third tab) and session value for P3_ESTIMATE will be D17-98765.
Now the salesperson has two windows open. He will now jump to the second window where estimate D17-12345 is opened and will click on Update Button. Since the session value for P3_ESTIMATE is set to latest click which is D17-98765, the PL/SQL Code (Process) on submit will update the wrong estimate at the database level. (Look at the PLSQL code when submit).
How do I create a dynamic action which will read the value of the P3_ESTIMATE from that particular page and do the appropriate updates?
Thanks
Ajay

is it possible to prevent oracle apex from submitting a page until a user clicks on a refresh button on that page?

I have just started working with Oracle APEX and would like users to be able to download reports from my application.The problem is I have a number of reports which have a large number of rows. Each time a user clicks on a page tab, the page is resubmitted and the query for the reports are executed again. This results in a lot of delay and is becoming frustrating for the users!
Is it possible to stop APEX from resubmitting the page until the user clicks a refresh button or is it possible to stop the query for reports from executing everytime the user clicks on a page tab?
To prevent submitting you can change the page template. Open page properties, in the section Shared Components find Templates. Near the word Page you will see a link to its template. Follow this link, then find a section Standard Tab Attributes. In the field Current Tab you will see something like this:
<li>#TAB_LABEL##TAB_INLINE_EDIT#</li>
Change this value to:
<li><a class="active">#TAB_LABEL#</a>#TAB_INLINE_EDIT#</li>
After that an active item in a menu will be displayed as a static text, not as a link.
All pages with this page template will have this behavior. If you don't need to change behavior of all pages: before changing template make copy of it, change the copy and choose the new template in a page properties.
Have you tried with the conditions?? I pretty new with Apex too, I had a similar problem, what I did was put conditions to the buttoms and regions.
After that I good a nice result. Hope it helps you.
Good luck

Go back button in single-page webapp

I'm bulding my first WebApp. I've got a small navigation bar in the head where a back button should be placed. The Pages of the app are all placed in one document so the div's are set to
<div id="page_1" class="page" style="display:none">
and will be shown by clicking on a link
onclick="show('Page_dash');
Now i want to have a back button which goes back to the last shown page. I've tried this
onclick="history.go(-1);
but it's not working because there is only one page which contains all pages so the history.go(-1) goes to the last visited homepage. So i'm looking for a good, fast and simple solution!
thanks
In order to create an effective single page application (SPA), you will need to implement a method to track history that appears traditional to your end users. There are a few different techniques for this, but as a developer of enterprise-level single page applications, I highly recommend using the url hash method.
This technique allows your end users to bookmark specific "pages" in your single page app, along with using their browser's back button to return to the previous page. End users can become extremely frustrated with a single page app if they try to return to the previous page using their browser's back button, and find that they are returned to Google, or whatever site they visited before yours.
Here is some additional reading on the subject: URL Hash Techniques

How to capture JavaScript events on a Facebook page's iframe tabs

I am planning to create some dynamic content in a Facebook tab for my fan page. It should have content displayed if the visitor is not a fan, and then upon them clicking the Like button, changing the content to display hidden carrots (metaphorically). Is it possible to capture the event of the click on the Like button from inside the iframe?
On a Facebook fan page, when the user clicks the Like button, the whole page gets reloaded and Facebook sends an HTTP post to your website with a parameter called signed_request that you would need to decode and look at with server code, not javascript. The code to decode it will obviously vary depending on what language you are using, but the process is documented on Facebooks site. Once decoded, you will need to look at the page.liked value.

Categories