0

I need a control in html that simulates the address bar of a browser.

For example, if I type "www.google.com" I want to automatically put the prefix "http://" or suggest the suffix .com. Also, to be able to control the history of it.

Do you know a jQuery plugin for this ? or how can be this done using css and javascript ?

Purag
  • 16,941
  • 4
  • 54
  • 75
Bogdan M.
  • 1,128
  • 1
  • 9
  • 23
  • have you done any code so far ? – mas-designs Feb 14 '12 at 08:46
  • no, i want to start but i need some suggestions. what is the best approach ? – Bogdan M. Feb 14 '12 at 09:05
  • Browser address bars do lots of different things. Different browsers do different things. Focus on the specific things you want to achieve and focus on them one at a time. As it stands, this question is very broad. – Quentin Feb 14 '12 at 09:16

1 Answers1

0

It can be done using html/css/js

I would suggest using jQuery to get the value of a html form field. Checking if there's a http:// or not/adding it is really not a big deal with Javascript.

I guess, you want to send the request with Ajax? Be aware that you can't just easily load any page external pahes you want in display them e.g. in a iframe. see here

Last but not least, jQuery this plugin could help you with your history.

Don't be afraid to try it on your own, instead of wasting to much time of looking for the perfect plugin you want to have. The internet is full of examples how to get the value of an element using JS or changing it's value. It's shouldn't be a big deal to simulate an address bar.

Community
  • 1
  • 1
Johannes Staehlin
  • 3,680
  • 7
  • 36
  • 50
  • Thanks a lot. I need also to load and display the page. I hope http://www.ajax-cross-domain.com/ resolves the issue. I need to try it – Bogdan M. Feb 14 '12 at 09:22