By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,256 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,256 IT Pros & Developers. It's quick & easy.

Navigate to URL with parameter passed to script at startup

P: 3
Good morning....As you will see when you view the script I am fairly new to Java. All I am trying to accomplish with this script is to navigate to the static URL listed in the script, however, one of the parameters in the URL requires the "Contact_Phone" variable which I pass to the script at runtime as a telephone number similar to the following;

"Siebel_Query_With_ANI.html 813466XXXX"

All the logic works great if I enter the phone number as a static entry in the URL or if I just assign this value to a variable within the script and reference that variable within the URL. I really need to launch the script with this varriable as the number changes each time.

Thank you in advance....PLEASE HELP.....

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. Contact_Phone = WScript.Arguments.Item(0)
  5. <script/>
  7. <script type="text/javascript">
  9. window.navigate("http://sdcrmweb01:80/ecommunications_enu/start.swe?SWECmd=InvokeMethod&SWEMethod=GetContact&SWEService=SND_CTI_Call&ViewName=All&Contacts&across&Organizations&BusObject=Contact&BusComp=Contact&Phone=" + Contact_Phone + "&SWERF=1&SWEBU=1","siebelcti");
  10. </script>
  12. </head>
  13. </html>
Jan 19 '10 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 5K+
P: 8,639
where do you get that phone number from?

PS. this is not Java itís JavaScript, there are some fundamental differences
Jan 19 '10 #2

P: 3
Thank you Dormilich for your response. The phone number gets automatically generated and stored in a variable when our call center receives a support call. I have an interface that automatically will launch an external program and also allowes me to call the external program and include this variable. This part works consistantly and I have viewed the variable and have never seen it not resolve to the caller-id/phone number. As I also mentioned if I manually store the phone number to a variable inside the script it navigates to the url and performs the query perfectly. I am struggling with this and as per your comment you can tell that I am not a seasoned developer.

Any guidance you could provide would certainly be appreciated.
Thank you...
Jan 19 '10 #3

Expert Mod 5K+
P: 8,639
as far as I have understood.

a) the phone number is correctly passed to the script
b) the URL works
c) the page (resp. the script) does not work

if that’s right, I can present a solution:
there is no window.navigate() method (ref. window). to load a new page use window.location.href = "";
Jan 19 '10 #4

P: 3
Thank you for your response......I can run the script in it's current configuration, and when I substitute the variable "Contact_Phone" with a valid phone number "8134660923 the URL will launch IE and navigate to the correct page every time. The only issue I am hoping to resolve is the external phone number variable is not being passed to the script. I have verrified that the phone number is valid.
Jan 20 '10 #5

Expert Mod 15k+
P: 16,027
If you add an alert after Contact_Phone is set, what do you get?

Expand|Select|Wrap|Line Numbers
  1. WScript.Arguments.Item(0)
JScript (for IE) on the client-side or is it meant to be, say, ASP server-side code?
Jan 31 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.