Hi
Can someone help me to code this, i need basic html only for offline
https://www.google.in/s?p_4:xxxx,p_n_pct:yyyy-&s=date
above is example url
I need two box where i can xxxx and yyyy value and it opens. example if in xxxx - put 100 and yyyy i put 500 then it url opens
https://www.google.in/s?p_4:100,p_n_pct:500-&s=date
I don't understand what you want to do. What you have after the ? is a query string and it can't be formatted the way you have it. Furthermore it must be meaningful, i.e. a script on the server must be evoked and interpret what you have in the query string and do something with it. You can't just put anything in a query string.
So what exactly is it you try to accomplish?
no
I am giving you example. If i want to search keyword "Nokia" in Amazon
i need to go to amazon > search for Nokia
url for this is, https://www.amazon.com/s?k=nokia&ref=nb_sb_noss
if i replace "Nokia" with any keyword it search for same.
i want to make one html page for many search and store in my local pc, so from there i can visit there where i want.
See iamage https://ibb.co/267Sy27
Thta is exactly what i want and there might be 2 field input for url for example
https://www.amazon.com/s?k=nokia&price=500
here i might change nokia and 500
So it's creating the form you want help with?
yes
Something like this
<form id="form">
<input type="search" id="query" name="q" placeholder="Search...">
<button>Search</button>
</form>
This i will save as html page in my pc.
amazon doesn't seem to recognize your price bit though.
A query string consists of name-value pairs. They can't be random. They names must be known by the program they are sent to and the values must make sense too. If you use the drop down to the left of the search field at Amazon, search for something and look at the query string you can see what names correspond to the different departments. That's all you can do.
The form goes like this. Note that you must use the URL https://www.amazon.com/s in the action attribute.
wow, working fine thannk.
But how can i add 2 field in one search
https://www.amazon.com/s?k=amazon&page=3
Example if want to change amazon and page number in above url like https://www.amazon.com/s?k=samsung&page=5
You add another form field for that.
Take a look at how the URL https://www.amazon.com/s?k=amazon&page=3 is constructed.
https://www.amazon.com/s is the base URL. The ? is the start of the query string. After that comes any number of name-value pairs separated by ampersand.
Thanks
what i got, it works fine if url has = value
<form action="https://www.amazon.com/s" method="get" enctype="text/plain">
<input type="text" name="k">
<input type="text" name="page">
in above example its k=*&page=* (*=whatever we put in field)
but how to do same if instead = there is something else, example
pct-off:70 here i want to edit value 70 so i a i add this,
<input type="text" name="pct-off:">
Then it doesn't work as i don't need to add = in ur
Did you invent the name "pct-off" yourself? If so that's why it doesn't work.
not myself, i need for some other
Giving you one real example https://www.amazon.in/s?i=kitchen&bbn=976442031&rh=n:976442031,p_85:10440599031,p_6:AT95IG9ONZD7S,p_n_pct-off-with-tax:70-&s=price-asc-rank
in above i want to change 70 only in whole url with custom field, it can be 80 or 66 or 40 any number value. How to do that kind of search form?
as its value is p_n_pct-off-with-tax:70-
Well, the name-value pair in this case is this whole shebang.
ok
Just getting that whole shebang for the rh name into the input field in the form isn't that hard with a little JavaScript. But that alone doesn't work. It seems that these bits are also needed.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)