implement 'Back' button on Mobile Query

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

implement 'Back' button on Mobile Query

Post by Jhstephenson »

I have a query being called on a Mobile Aware App that in turn could call other Queries. I would like to put a 'Back' button on the child queries to return to the one that called them.

So, I created a Custom Javascript Panel Operation and used the following:

Code: Select all

<button onclick="history.back()">Back</button>
The button shows up on the Top Panel Toolbar, but when I click on it, nothing happens.

I also tried using:

Code: Select all

<input type="button" value="Back" onclick="window.history.back()" /> 
But that doesn't do anything either.

Is it possible to do something like that?
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: implement 'Back' button on Mobile Query

Post by Jhstephenson »

I should add that if I put the code:

<button onclick="history.back()">Back</button>

Into the custom query footer it works just fine.

The problem there is that it add that button for every record found. I only want it to be on the form once.
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: implement 'Back' button on Mobile Query

Post by Jhstephenson »

Another addendum...

I found I can put this code:

<button onclick="history.back()">Return</button>

or the other one I mentioned, In the Panel Header and it will work.

It shows up like this...
Screenshot 2022-01-31 150333.png
Screenshot 2022-01-31 150333.png (7.15 KiB) Viewed 1623 times
It isn't exactly how I want it. but it works. I would still prefer to have it in the Panel Operations, next to the "+" icon.
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

[Solved] implement 'Back' button on Mobile Query

Post by Jhstephenson »

Figured out the issue. The 'javascript' I was using included too much stuff.

All I really needed was "history.back()"
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: implement 'Back' button on Mobile Query

Post by Jaymer »

what does your "PASS Witnesses" screen look like now on mobile?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: implement 'Back' button on Mobile Query

Post by Jhstephenson »

Screenshot 2022-02-02 114941.png
Screenshot 2022-02-02 114941.png (16.02 KiB) Viewed 1603 times
Post Reply