0

I have no web developing experience at all so explanation with details would be appreciated! Let me know what other information if you think my questions is not clear.

I have a webpage, say the url looks like this:

www.mycompany.com/category1

And it contains a parametric search box. There is an apply button in the parametric search whose source code looks like this:

<input type="button" value="Apply" id="Button" class="button-link" style="color: rgb(0, 0, 0);">

It redirects you to another page after you click the apply button which contains the search results and the URL looks like:

http://www.mycompany.com/jsp/search/browse.jsp?N=2001109&No=0&getResults=true...

I took a look at the source code of the mycompany.com/category1 page and I cannot see the existence of the string '2001109' which looks like contains the information of my search..

I am wondering how is the URL generated?

It might be generated by JQuery/JavaScript/PHP..(I don't know any of these) and how could I locate the file which is used to generate the URL maybe using Chrome Web Developer Tools. Thanks a lot.

1 Answer 1

1

Your parametric search box will be in a html form tag <form> this is the default behavior of form if you don't specify the method attribute this will be assumed as the get method to request a server ,2001109 is the value of one of the <input> field within a form if you see the html of the form there will be an action attribute which tell where to send the form information which contains this http://www.mycompany.com/jsp/search/browse.jsp url as i said there was a get request method is used therefore all the information within input fields lie in the <form></form> will be appended in the url which commonly known as query string if your request method is defined as post then information within a form will not be appended in the url it will be in browser

form

html-get-vs-post

Query_string

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a lot for your answer, dianuj, I am currently diving into the code and it did acted as you mentioned. Which IDE - editor are you using so you could test your html code and it does the syntax highlight? thanks
I use jet brains ide for php ,html but it depends on you which programming language you use jetbrains.com/phpstorm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.