Page 1 of 1 1
Topic Options
#134040 - 2005-02-18 04:51 AM How to pass multiple parameters when starting a web page?
davide Offline
Lurker

Registered: 2005-02-18
Posts: 2
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?


Edited by davide (2005-02-18 05:15 AM)

Top
#134041 - 2005-02-18 05:03 AM Re: How to pass multiple parameters when starting a web page?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
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.

Edited by Les (2005-02-18 05:18 AM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#134042 - 2005-02-18 05:20 AM Re: How to pass multiple parameters when starting a web page?
davide Offline
Lurker

Registered: 2005-02-18
Posts: 2
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?

Top
#134043 - 2005-02-18 05:26 AM Re: How to pass multiple parameters when starting a web page?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11558
Loc: CA
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



Edited by NTDOC (2005-02-18 05:42 AM)

Top
#134044 - 2005-02-18 05:27 AM Re: How to pass multiple parameters when starting a web page?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
shell '%comspec% /c start HTTP://www.mypage.com?key=123^&key2=456'
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#134045 - 2005-02-18 05:30 AM Re: How to pass multiple parameters when starting a web page?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
shell '%comspec% /c start http://search.yahoo.com/search?p=kixtart^&script'
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#134046 - 2005-02-18 05:30 AM Re: How to pass multiple parameters when starting a web page?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11558
Loc: CA
ROFL

That is a valid link if you click on it Les

The mypage key one


Edited by NTDOC (2005-02-18 05:33 AM)

Top
#134047 - 2005-02-18 05:38 AM Re: How to pass multiple parameters when starting a web page?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
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?"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#134048 - 2005-02-18 01:17 PM Re: How to pass multiple parameters when starting a web page?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
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.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 138 anonymous users online.
Newest Members
Steff, phanhuyen, Jeroen_Ruijter, Tienn, tmvngocdung42
17545 Registered Users

Generated in 0.162 seconds in which 0.068 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org