un4given1 Posted April 6, 2005 Posted April 6, 2005 Hey everyone. Maybe you can help me out. I need a javascript that when run will pop up and ask "Client ID Number" and once you enter it and click "OK" it launches a website using that variable.Question: "Client ID Number"Buttons: OK, CANCELLaunch: http://companyweb/clientfiles/Files/Forms/Indexed.aspx?View=%7bBD14E85E%2dB310%2d4343%2d8960%2d263A8F21EFE3%7d&FilterField1=Client%5fx0020%5fID&FilterValue1=VARIABLEOnce you click OK the box should disappear and launch IE using the URLIE launches a URL using this method...c:\program files\internet explorer\iexplore.exe http://www.sitename.comI appreciate any help you may be able to give me. If you can create it or point me where I might find more information on how to do this it would be much appreciated.Thank you!
gunsmokingman Posted April 6, 2005 Posted April 6, 2005 I Do Not Know If This Will Help Dim ClientX1 = "http://companyweb/clientfiles/Files/Forms/Indexed.aspx?View=%7bBD14E85E%2dB310%2d4343%2d8960%2d263A8F21EFE3%7d&FilterField1=Client%5fx0020%5fID" Client = InputBox ("Input Your Client Number")If Client = "" Thenwscript.quitElse If Client= Client Then Set client = CreateObject("Wscript.shell") client.run (X1)End IfEnd if
un4given1 Posted April 6, 2005 Author Posted April 6, 2005 Thank you for your help... I actually decided to delve into it myself and was able to piece this together and it works perfectly. Set WshShell = WScript.CreateObject("WScript.Shell") clientid = InputBox("Please enter the client ID","Client ID")IF clientid = "" Then WScript.QuitEND IFurl = "c:\progra~1\intern~1\iexplore.exe http://companyweb/clientfiles/Files/Forms/Indexed.aspx?View=%7bBD14E85E%2dB310%2d4343%2d8960%2d263A8F21EFE3%7d&FilterField1=Client%5fx0020%5fID&FilterValue1=" + clientidWshShell.Run(url)
gunsmokingman Posted April 6, 2005 Posted April 6, 2005 Looks Like We Get The Same Results 2 Different Way. Here A Re - Edit Of My First Script.Client = InputBox ("Input Your Client Number")If Client = "" Thenwscript.quitElse If Client = Client Then X1 = "http://companyweb/clientfiles/Files/Forms/Indexed.aspx?View=%7bBD14E85E%2dB310%2d4343%2d8960%2d263A8F21EFE3%7d&FilterField1=" & Client Set client = CreateObject("Wscript.shell") client.run (X1)End IfEnd If
un4given1 Posted April 6, 2005 Author Posted April 6, 2005 Yep. Thank you for the post thought. I really appreciate it. Hopefully it will help someone else some time. I'm one of those guys that doesn't like to wait and always eager to learn so after I posted I just decided to try to figure it out myself. That's the first thing I have ever done in VBS. It's not really as hard as I had once thought it was. I think I might have found my next project. Thanks again!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now