Jump to content

Recommended Posts

Posted

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, CANCEL

Launch:

http://companyweb/clientfiles/Files/Forms/Indexed.aspx?View=%7bBD14E85E%2dB310%2d4343%2d8960%2d263A8F21EFE3%7d&FilterField1=Client%5fx0020%5fID&FilterValue1=VARIABLE

Once you click OK the box should disappear and launch IE using the URL

IE launches a URL using this method...

c:\program files\internet explorer\iexplore.exe http://www.sitename.com

I 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!


Posted

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.Quit
END IF
url = "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=" + clientid
WshShell.Run(url)

Posted

Looks Like We Get The Same Results 2 Different Way. :thumbup

Here A Re - Edit Of My First Script.

Client = InputBox ("Input Your Client Number")

If Client = "" Then

wscript.quit

Else

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 If

End If

Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...