Reputation: 441
I am making simple browser. I want to implement a search box which will automatically redirect to the results of search for example in http://uk.ask.com/ it looks quite simple.
If I was going to search for "hello SO" it link would look like this.
http://uk.ask.com/web?qsrc=1&o=0&l=dir&q=hello+SO+&dm=all
So what I am wanting to do is make a JTextField where user can enter what he is searching for, and then just fill in whatever he typed into the url
http://uk.ask.com/web?qsrc=1&o=0&l=dir&q="FILL HERE WITH + instead of spaces "&dm=all
I don't know how to split the string entered and fill the spaces with + signs. Any idea ? Also this is just the way I thought it would be possible to do it. I would much appreciate any other suggestions. Thanks in advance
Upvotes: 2
Views: 261