I am trying to create a sample Online shopping application using SPRING+REST. I have a 1000 of products and I would like to make use of #RequestMapping("watches/{id}") annotation . But i dont know how to send the id form field value alone while submitting a form in jsp.
I want something like this
www.example.com/watches/1001
Please help me out
I guess you will have some jsp page which consists of all watches. This web page can be access by localhost:8080/watches URL.
If user click on any watches, user will land to localhost:8080/watches/{watch-id} page as the click on watch will redirect the request.
If your JSP is form based page, then user need to enter the watch-id ( or watch name which we need to map to watch id) and click on submit button will redirect the request to localhost:8080/watches/{watch-id}. Please let me know if you are ok with this.
Related
I'm trying to catch email address as a variable with Google Tag Manager (GTM) on signup form submit on http://cloud.feedgee.com/ru/signup and fire a tag with it. On submit, the page is being reloaded.
By now tried to catch it with Form submission by form id set as shown on screenshot) and a Button click as a Custom event with it's click id
I initiated a DOM element variable with Id of the Form text field (Element Id=ContentPlace_loginEmail)
With these settings in Preview mode on Form Submit, I can not see my Tag in "Tags Fired On This Page" row before page reload.
What can be the reasons for this if Id's of the elements are correct?
May it depend on the container script location on the page?
Now It's located right after the HTML tag.
Can I store form text field in a DOM variable to use it in the tag?
If you want to store the email value in your own API, Google Tag Manager is not the right tool for you. You should only use it to track events that fit under Google's terms of use.
Having said that, when you're working with forms in GTM, hold the <shift> key with you click the submit button. If you do that, a new tab will open up, but the current page wont get redirected or refresh. You'll then be able to see what data is being pushed to the dataLayer.
I'm looking to record the URL from which a form submission was sent from with Google Analytics.
Example:
Imagine domain.com. On domain.com Google Analytics (ga.js) is installed in the header.php and is on every page of the site. Similarly, in domain.com's footer.php there's the same contact form generated on every single page of the site.
Now, User 1 goes to domain.com. User 1 navigates to domain.com/page-c.html. User 1 submits a form from the footer contact form on page-c.html.
I want to know that a form was submitted from page-c.html. Or if User 2 submits from page-u.html then I know that a form was sent from page-u.html. It is not important that I know that it is User 1 or User 2. I just want to know the URL from which the form was sent.
Anyone know how to do this with Google Analytics? -- If not, maybe another analytics service?
You can use Google Tag Manager. Which can not only implement all the standard analytics capabilities but also lets you add event triggers with built-in variables. For example you'd enable the Page URL variable in GTM and add a Analytics Tag of type Event with Event Category, Action, Label being things like Contact Form, Submit, {{Page URL}} respectively. Then create a new trigger (triggers tell when to fire a tag). This trigger should be enabled always (i.e. something like PagePath contains / and be of type Form Submission. You can target it even better by saying trigger when to be when the Form ID is equal to the ID attribute of your contact form. This way you prevent conflicts with other forms triggering your event tag.
You can read extensively on Google Tag Manager here. It is a great tool to fine tune analytics and get more out of it.
just created a from using "custom form" with input fields like - "Title", "Caption", "Alternate Text", and a button called "Submit". After submit i need to show the entered input fields as an output in another page. How can i achieve this.
Pls guide me with step by step solution. I am not a developer, Im just a designer
So, you created a custom type and added those fields.
Then created a custom form with this type.
You can configure the form to redirect after submit thanks to an textbox that allows to use Tokens, i.e dynamic information retrieved by the content.
Thanks to this, you should be able to redirect to the display url of the content.
To display the output the way you want in another page, you need to make an override of your content in your theme.
You can enable the 'Shape tracing' feature to generate this alternate view of your content and then modify it as you want.
I have a page called contact.htm with a working form. One of the checkbox fields on the form is named Garden (so either it is checked or not when using the form).
I have another page that I want to link to my form page, so that if a user clicks a particular link, they are sent to the form page and the field Garden is pre-clicked.
I have not been able to do this though I have tried several methods...such as:
a href="contact.htm?checkbox=Garden,on" or
a href="contact.htm?checkbox=Garden,checked" or
a href="contact.htm?input type="checkbox" name="Garden" value="checked", and some others.
I would appreciate any help.
You'll need to use JavaScript on the target webpage to process the argument and fill the values in. There is no automatic way of doing this just by URL.
This link shows how to retrieve URL arguments from JavaScript. From there, it's a matter of using standard JavaScript or JQuery to fill the values in.
Im trying to grab a HTML source code from a webpage which needs user to login with username and password, the code are all done in the back end, i can not use "?username=xx&pw=xxx" to get the html code.
There are many apps that does this kind of things, such as getting usage from a phone provider or view bills.
I would like to know how do people implement this. do they create some kind of robot that input those username into the textfield and click submit? and is there a way to download the html straight from the server, rather than create our own server to retrieve it.
How do i set the username textfield on the webpage and click log in button to retrieve the next page?
Thanks in advance
i can not use "?username=xx&pw=xxx" to get the html code.
Why not? If a user can submit their login creds over HTTP, then you can do the same. You'll probably need to use POST instead of GET to submit those fields, and there may be other fields on the form that you'll need to match. But the web server doesn't (in principle) have any idea what sort of client is submitting login data to it.
Now, they might screen out older, non-supported browsers, in which case your USER_AGENT field will need to be fudged to some legal value. There may be some session timeout token in the form that you need to get first and provide in your submitted data. Who knows what else they need back from you to validate the login. But if a web browser can do it, you can do it from the HTTP client methods in your app.