[website-critique] Re: Need help with JavaScript programming.

  • From: "Eric C. Vogel" <EricCVogel@xxxxxxxxxxxx>
  • To: <websitecritique@xxxxxxxxxxxxx>
  • Date: Wed, 8 Aug 2001 10:30:38 -0400

Nevermind I think I figured it out. I changed
window.location.href=urlStr+company+".asp"}
to window.location.href=urlStr+company}

Thank you,
Eric Vogel----- Original Message -----
From: "Eric C. Vogel" <EricCVogel@xxxxxxxxxxxx>
To: <websitecritique@xxxxxxxxxxxxx>
Sent: Wednesday, August 08, 2001 10:26 AM
Subject: [website-critique] Need help with JavaScript programming.


> I was able to find someone who provided me with the code I needed, but it
doesn't quite do what I need it to do. I was wondering if anyone on here
could correct it. I looked it over with my little knowlage of C I have had
and cannot find the reason it is producing what it is.
>
> The page the code is on is:
> http://www.benefitservicesgroup.com/ebsg/client_access.htm
>
> Enter jf for the company and it goes to:
> http://www.benefitservicesgroup.com/ebsg/client_access.htm?company=jf
> It should go to http://www.beenefitservicesgroup.com/ebsg/clients/jf
>
> Here is the code that goes in the body:
> <SCRIPT language=javascript>
> <!--
> function
Company(){ 
> var company = document.myform.company.value; 
> urlStr = "http://www.benefitservicesgroup.com/ebsg/clients/"; 
> if(company!=""){ 
> window.location.href=urlStr+company+".asp"} 
> else{ 
> alert("Please enter a company"); 
> return false;} 
> } 
> file://--> 
> </SCRIPT> 
> 
> And in the main part:
> 
> <FORM name=myform> 
> <INPUT type=text name=company value="" size="20"> 
> <BR> 
> Enter your company name 
> <BR> 
> <INPUT type=button value=Go onclick="getCompany()"> 
> </FORM>
>  
> Thank you,
> Eric Vogel
> 
> 
> 
> Please Forward This Email to a Friend 
> 
> ~~~~~~~~~~~~~~~~~~~~~~
> List Info: 
> http://www.freelists.org/cgi-bin/webpage?webpage_id=websitecritique 
> ~~~~~~~~~~~~~~~~~~~~~~



Please Forward This Email to a Friend 

~~~~~~~~~~~~~~~~~~~~~~
List Info: http://www.freelists.org/cgi-bin/webpage?webpage_id=websitecritique 
~~~~~~~~~~~~~~~~~~~~~~

Other related posts: