[Mapserver-users] Re: queryfile - strange results
Richard Greenwood
rich at greenwoodmap.com
Thu Mar 4 06:26:39 PST 2004
Steve McCrone wrote:
> I'm doing an itemquery and wish to keep the polygon selected highlighted
> after further interaction with the map.
>
> In my tempalte file, I use -
>
> <SCRIPT language=JavaScript>
> var qfile = ("[queryfile]".substring(0,1) != "[") ? "[queryfile]" :
> "";
> </SCRIPT>
>
> And then further down in the body, I use -
>
> <SCRIPT language=JavaScript>
> if (qfile) {
> document.write("<input type='hidden' name='queryfile'
> value='[queryfile]'>");
> }
> </SCRIPT>
>
> Appears logical. However, the string for the full path for the queryfile is
> strange. Once I pan the map after selecting the found polygon, I get the
> following -
>
> msLoadQuery(): Unable to access file. (C:Inetpubwwwroot
> mpDEMO1078391348536.qy)
>
> Notice the wierd string for the location of the *.qy. Further down on my
> page, I have simply palced [queryfile], and it displays the correct full
> path of the query file -
>
> C:\Inetpub\wwwroot\tmp\DEMO1078391348536.qy.
>
> Obviously, it cannot access the file C:Inetpubwwwroot
> mpDEMO1078391348536.qy, since it makes no sense.
>
> Any ideas?
1. Try "/" instead of "\".
2. Change your input type from 'hidden' to 'text' so you can see if the
"\" is getting mangled incoming or outgoing.
--
Richard Greenwood
www.greenwoodmap.com
More information about the MapServer-users
mailing list