davide
(Lurker)
2005-02-18 04:51 AM
How to pass multiple parameters when starting a web page?

I am able to open a web page from within Kixtart and pass a single parameter with the following command:
shell '%comspec% /c start HTTP://www.mypage.com?key=123'

I need to pass more than one parameter which requires using the '&' as in:
shell '%comspec% /c start HTTP://www.mypage.com?key=123&key2=456'

My problem is the second parameter is not being accepted, I presume because the ampersand is interpreted as an operator in Kixtart.

Is there a way to use the '&' in a URL to pass more than one parameter to the web page?


Les
(KiX Master)
2005-02-18 05:03 AM
Re: How to pass multiple parameters when starting a web page?

I assume that in your script, you are providing the closing quote unlike your example was before you edited it. KiX will not act on the & if inside quotes but since you are SHELLing to DOS, the command interpreter certainly will. You would have to escape it in DOS with the ^ caret.

davide
(Lurker)
2005-02-18 05:20 AM
Re: How to pass multiple parameters when starting a web page?

Yes, the ending quotes are there (I've edited the original post, Thanks).

But can you help out a newbie with an example of "escape it in DOS with the ^ caret" please?


NTDOCAdministrator
(KiX Master)
2005-02-18 05:26 AM
Re: How to pass multiple parameters when starting a web page?

I think might also be able to replace the & with %26

As in this example

http://search.yahoo.com/search?p=kixtart&script

should also work like this

http://search.yahoo.com/search?p=kixtart%26script


For more information please review here
URL Encoding

URLEncode Code Chart



Les
(KiX Master)
2005-02-18 05:27 AM
Re: How to pass multiple parameters when starting a web page?

shell '%comspec% /c start HTTP://www.mypage.com?key=123^&key2=456'


Les
(KiX Master)
2005-02-18 05:30 AM
Re: How to pass multiple parameters when starting a web page?

shell '%comspec% /c start http://search.yahoo.com/search?p=kixtart^&script'


NTDOCAdministrator
(KiX Master)
2005-02-18 05:30 AM
Re: How to pass multiple parameters when starting a web page?

ROFL

That is a valid link if you click on it Les

The mypage key one


Les
(KiX Master)
2005-02-18 05:38 AM
Re: How to pass multiple parameters when starting a web page?

PFFT!

the subject line reminds me of a support call I got back in the good old DOS days.

"what does it mean when the computer says I have an invalid (pronounced as in crippled) pair-o-meeters?"


LonkeroAdministrator
(KiX Master Guru)
2005-02-18 01:17 PM
Re: How to pass multiple parameters when starting a web page?

I think you boys go way out there...
& is problematic because the line does not have proper quotes and command interpreter is used.

to fix the issue, change it to:
shell '%comspec% /c start "HTTP://www.mypage.com?key=123&key2=456"'

or, to best work:
run 'explorer "HTTP://www.mypage.com?key=123&key2=456"'

this way, it makes explorer (not IE) fire your default browser.