Show flash message after user open specific page - ruby-on-rails

I need create flash notification after user open specific page.
For example: we have page "A" in website menu. User click to link and open page "A". And after page "A" loading - showing
flash[:note] = page_a.note_message
And every time when user open page "A" - again showing this notification

By default, adding values to the flash will make them available to the next request, but if you need to access those values in the same request you can use flash.now in the controller.
You can read more about it in the Guides

Related

iphone "add to home screen" ignores querystring parameters

I have a mobile-friendly web application which I want users to be able to access from a link sent in an email or text. The link will include a querystring parameter specific to that user, which controls what the web site displays. This link might look like this:
https://corpsite/myapplication/?show=578
When the user goes to this URL using safari, the site grabs some information which is correct for the "show=578" parameter and all is good. (Security is not a factor here.) But after the application is installed to the home screen with the "Add to Home Screen" function of the iPhone 8 I am testing with, the URL which opens upon clicking the home screen icon is:
https://corpsite/myapplication/
The querystring information is not preserved! (I ultimately wrote some debugging code that tells me the full URL when the application loads. When I click on the link from an email and go there in Safari, the reported URL includes the querystring. But when I then save that page to the home screen and later click on the home screen icon, the reported URL does not include any querystring information.)
I have added this to the index.html page of the (Angular 5) application, which I thought would be all I would need to do (aside from some icon-related tags):
<meta name="apple-mobile-web-app-capable" content="yes">
How can I make this work from the home screen icon?
I found the source of my problem here:
PWA loses its params and query params after being added to the home screen.
It turns out that I was setting the start_url in my manifest.json file, and that was overriding the value in the browser. I just removed that setting from the manifest.json file, and the phone then used the URL from the browser when saving to the home screen.

how to stop to show Remember Password

I make Application with webview to my Application. when i want to Login some pages and i want to login saites the confirm Message is displayed.and it says that do you want the browser to remember this password. I don't want to show this Message and i dont want to click on never
what should I do to stop showing this Message and what should i do to Not displayed this Message
you can see the see screenshot
http://i.stack.imgur.com/1kulj.jpg
You can turn this behavior off with the WebSettings.setSavePassword() API. Please see http://developer.android.com/reference/android/webkit/WebSettings.html#setSavePassword(boolean)

Invoking Safari on iOS without opening a new website

The situation is like this:
User opens app from a website using a custom urlscheme
User does stuff in the app
User clicks button in the app to return to the website in Safari.
I have tried opening a new tab containing a javascript:window.close() but this does not work on iOS 6.1.
So my question is: Is there a way to open Safari to view the website the user left from? Either with a working new tab that closes itself or a different route?
When you open the app with your custom url scheme, pass the actual page url as an argument.
mycustomUrlScheme://mydomain.com?objectid=1234&callback_url=encoded_url
In your app, handle the url for the content info and keep the page url to open it afterwards. It will make safari open a new tab. But that should be a good start.
As far as i understand you can do it.
user opens mobile safari for example http://www.example.com
user clicks a link that is appscheme://open and the application become active
user taps a button to open safari for example http://www.example.com?q=test
for the third step you can use [[UIApplication sharedApplication]openURL:url]

Take control of the hardware back button using jQuery Mobile

I have gone through the following link and my situation is same like it.
Disable the hardware back function with jQuery Mobile
Situation: Device under test: Samsung Galaxy S III
Page A: ListView with Names(A1, A2, A3)
Page B: Consist of a Form, Submit and Cancel button.
The user fills in the form and click on the Submit button. And his/her data gets uploaded to the server. The page is updated and a confirmation dialog is displayed that data is uploaded to the server.
Now the issue arrives.
Now when the user clicks on the hardware back button he/she is again redirected to Page B and he/she is again able to submit the form (which we don't require, as the form is meant to be filled only once).
So is there a way through which I can control the hardware back button to show Page A whenever it is on Page B?
The following answer from Nirmal seems to have answer, but I don't know how to implement it -
There is no real way disable the hardware back button on the
BlackBerry or Android.
What you can do is maintain a session variable which gets invalidated
in your back handler and check for that session variable in the
pagebeforeshow event of the Exam page.
How can I fix this?
You should be able to capture the hardware back button click event with JavaScript:
$(document).bind('keydown', function(event) {
if (event.keyCode == 27) {
// Prevent default (disable the back button behavior)
event.preventDefault();
// Your code to show another page or whatever...
}
});
Use cookies. Whenever the form is processed, add a value to the user's cookie and on the form page check if that cookie value exists.
If it does, just show the user a message which indicates that the data have already been submitted or redirect the user to the main page.
I included the Login form and the page the user is directed after login, in the same HTML file as two pages (multi-page containers).
After validating the login, I call the changePage to the id of the new page I want to load with changeHash as false. This way, the user won't be returned to the login even by the hardware back button.

hyperlink manager changes the link in dotnetnuke

as i enter the url in hyperlink manager and click check the how many time this link is clicked option ,my url automatically changed when i see next time.
i check that its only change the url which is in portal alias table exists and replace my url
with dot .
any one have any idea.if u need more description i can provide ??
In order to track the number of times a link is clicked, it must use a LinkClick type link. If you don't check the "Track the number of times this link is clicked" option then it will use a "normal" URL.

Resources