My form isn't sending visitors to the right page - javascript

The page is here:
http://bluebeam.com/us/trials/punch/
It's supposed to send visitors to a download page after it's filled out but it's not. They still get an email confirmation after they fill it out but they aren't sent to a new page.
I don't know enough about javascript to trouble shoot this issue.
Anyone know why they aren't being redirected?
Thanks!

Hrmn. I don't know if this is javascript related, but your form action says it goes to index.asp?src=99. You might want to put a different page that says download and have your code their to download and then redirect back to index.
And/or you might want to edit your question and add code fragments or other stuff to pinpoint where you might think the problem is.

Related

hide an HTML form action url from the page source

Is it possible I hide an HTML form action url from user? I mean that user can't see it on the page source code.
I found this way , but in this way user can find that action from the page source!
In principle this is impossible, because the browser needs to know how to handle the form, and anything the browser knows, the user can know. Perhaps if you give more details about what it is you're trying to do, there is another solution.

Calling a website with results from javascript

I have a small app which calls an URL and scrape the data returned from it. I now want to do something similar for another site but this site uses JavaScript and the results are not included in the html. I've found a way to retrieve the data by using "stringByEvaluatingJavaScript" but to complicate things, the results I want is displayed on the webpage only after I click a button / function on the website:
i.e. To get to display the results I want, I have to:
1) go to the website. (data is displayed but not what I want) 2) click one of the options on the site. (data I really want is displayed)
The URL of this page never changes, as expected being JavaScript. So I want to know if there's a way to call the page so that when the page is displayed, it is already on the option I want, e.g. "https://example.com/page1?option" etc...
I don't know if this is possible since I don't know JavaScript but technically I think it should be?
Thanks.
I would use the Developer Tools/javascript console on your browser
(Chrome has a pretty good one) to see what the browser sends to the
server when you click on the button, then use that as the basis for
your query. – cowbert
#cowbert's suggestion really did the trick! Upon digging more, I found more results in the Chrome console and one of them actually has the link to the data which is what I need!
Thank you to all who contributed! This is my first post here so if I didn't do something right, please forgive me.

created buttons with user input, how to store them for the next time

I created a html page, where the user can create a button via javascript/jquery, which will appear on the html page after adding it.
So my question is, how it is possible that the button will be there also if I am closing an opening the page again?
I hope my question is clear, I can also post my code if it is necessary! Thanks!
You will need to use some server side code to do this.
You cannot rely on cookies since they will be gone sooner or later.
PHP with MySQL to store the information you need seems like the easiest approach for some simple user database interaction.
There's not much to work with here hope you find this response helpful and guiding you the right direction.

Tell when a user is going back in browser history

I have a page A that displays some text from my database. The text is editable and gets autosaved using AJAX. If the user would go away from that page, and then go back to page A using browsers history functionality, the page would not have the latest data (since we went back in history). And the user would edit the old data, which would overwrite the latest data on the server when it gets autosaved.
I assume this is purely a front-end issue, where my server can do nothing about this. What solutions could be aplied? If it was possible do detect with javascript that the user went back in history, then I could simply display a text saying that the user has to refresh the page. But is that even possible? Or are there any better solutions?
There are lots of options and strategies for a situation like this.
The first thing you can do is to try to disable caching on the page. You can use meta tags to do this.
You can also keep track of when the user presses the back button using libraries such as this one. You can respond either on the server or on the client, although you want to be careful because a disabled back button can annoy users.
Should you ever happen to consider using a javascript framework such as AngularJS you can probably keep track of the back button using the framework.
Finally you can solve issues like this with careful page design. If the data on a page can change you might load the current data via ajax before the user has a chance to edit it. By doing this - your "load" code will run even if the user does use the back button. Take a look at this stack for more information on that!
Hope these suggestions help a bit!
If you are using Jquery then use/
$(document).on('pageshow', '#Content' ,function()
in place of
$(document).ready(function()
It will solve your problem, the javascript file that is back end will be loaded when that particular page loads

Canonical Java EE way of checking for unsaved session data?

My app has a use case where there is a page where the user can edit data and press save or interrupt editing and make a search or click links. The framework is kind of odd and uses javascript to submit a form for every link that is clicked so we ended up with a mishmash of javascript and java hacks the facilitate the dialogs and checks for unsaved data which became messy and I had to ask about it:
How to exclude components from javascript onkeydown
https://stackoverflow.com/questions/12525020/why-does-this-code-create-a-loop
I either got dialogs that never ended, pressing "yes" to "You have unsaved data. Do you want to comtinue?" made a loop to another same dialog and when I tried to fix it nothing works.
Now the program works on the screen but the solution is messy and if there is another bug or we notice that my solution affect other component there will be trouble.
So I'm asking if you know a plain Java way to check for unsaved session data? What happens is a form is presented to the user and clicking a link when data has been edited should present a dialog thatwarns that data is unsaved. I think doing it without javascript is a better solution, can you comment and/or help me here?
No.
The user enters data in their browser; there is no way for the server to know this unless you submit it.

Categories

Resources