-2

You know passing value to field by URL could be done by :

?name=data

For example :

Google.com/?q=stackoverflow

And then when you open this link you have "stackoverflow" written in the field. But I can't do this with some websites. For example : ( GitHub search bar name is also "q" )

github.com/?q=stackoverflow

If you open this link there is no text in the search field. I want to know why and how to make this method work for these websites?

user1599537
  • 1,269
  • 3
  • 10
  • 10

1 Answers1

1

The site has to parse the data out of the URL and use it to set the value attribute of the input when they generate the HTML to send to the browser.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • ok what can I do with that websites which don't do this action with query strings ? I mean passing data from URL to fields? – user1599537 Sep 08 '14 at 15:33
  • 1
    You could write a browser extension and install it on your browser. – Quentin Sep 08 '14 at 15:34
  • I think I didn't ask my question correctly could you please see this link : http://stackoverflow.com/questions/25719895/fill-an-input-box-by-url-without-editing-the-receiver-page – user1599537 Sep 08 '14 at 15:36
  • 2
    @user1599537: Quentin's comment still applies. You can write a browser extension or user script that does that, but it will work only in your browser then. – Felix Kling Sep 08 '14 at 15:39
  • 1
    You can read the documentation for writing extensions for whatever browser you are using. – Quentin Sep 08 '14 at 15:44