javascript problem

Jody F. Kerr plug-discuss@lists.plug.phoenix.az.us
Wed, 4 Dec 2002 01:58:57 -0700


My JS is a little rusty, but here goes.....

<script language=Javascript>
function GoSomewhereElse(Url){
	self.location.href=Url;
}
</script>

...some HTML stuff, form tags and the like.....

<input type="text" value="http://" name="InputUrl">
<input type=button value="Go!" name="GoButton"
onClick="javascript:GoSomewhereElse(document.FORMNAME.InputUrl.value)">

...the rest of the HTML stuff here....

please note that it does *no* validation to ensure that the address input is
valid or not. also, FORNAME is the name of your form.

Jody


> -----Original Message-----
> From: plug-discuss-admin@lists.plug.phoenix.az.us
> [mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of BoBB
> Sent: Wednesday, December 04, 2002 1:38 AM
> To: plug-discuss@lists.plug.phoenix.az.us
> Subject: javascript problem
>
>
> Hi, I am wanting to make a javascript function that will load a new url
> from a form submit. Like enter a url in the box click and it loads. It
> has to be client side and i'd prefer if it loaded in the same window not
> a new one. If anyone has any clue how/if this can be done i would
> appreciate it. I havent been able to find anything, my lack of
> javascript knowledge doesn't help much.
>
> --
> BoBB
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>