Simple HTML help

John Chambers jc at trillian.mit.edu
Sat Mar 25 14:34:55 EST 2006


Robert La Ferla wrote:
| Tom Metro wrote:
| >
| > Technically, this can't be done with just HTML. But a little bit of
| > JavaScript will accomplish what you want to do. Assigning the value of
| > the form control holding the URL to the window.location.href property
| > will cause the redirect to occur. That assignment could happen in
| > response to clicking a button. Google "window.location.href" and you
| > should turn up hundreds of examples.
|
| You beat me to it!  I was trying to get submitting via enter to work.
| But this is how it is done with a button:

Actually, I was tempted to point out that you  don't  even  need  any
HTML.   I  have 10 browsers on this machine, and all of them proved a
URL-entry widget above every web page.  You just type in a  URL,  hit
Return, and it takes you to that page.

;-)


(And I am aware that a few  browers,  like  lynx  and  the  WebViewer
brower  on  my  BlackBerry,  don't  do  this.  But they also don't do
javascript, so that solution also doesn't work everywhere.   Probably
the  only way to do it everywhere is as in the php example, where you
have an <input> widget in a html form, and a CGI script back  on  the
server that fetches the page and delivers it.  Strictly speaking, the
task can't be done with html alone,  because  html  is  only  markup.
Doing anything with user-entered data takes a bit of code somewhere.)


--
   _,
   O   John Chambers
 <:#/> <jc at trillian.mit.edu>
   +   <jc1742 at gmail.com>
  /#\  in Waltham, Massachusetts, USA, Earth
  | |



More information about the Discuss mailing list