Google Groups Home
Help | Sign in
Discussions > KML Server Side Scripting > Problems passing arguments in <href> element under a network link
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Tallywag  
View profile
 More options May 17, 1:18 pm
From: Tallywag
Date: Sat, 17 May 2008 10:18:25 -0700 (PDT)
Local: Sat, May 17 2008 1:18 pm
Subject: Problems passing arguments in <href> element under a network link
Ok first post for help on KML everything up to this point has been
pretty straightforward !

I want to pass two arguments to my writeKML.php script from a network
link .KML file however all my attempts to do have failed.

    <NetworkLink>
      <Link>
        <href>http://www...../writeKML.php?arga=A-
BCDE&argb=2008-04-16</href>
        <refreshMode>onInterval</refreshMode>
        <refreshInterval>300</refreshInterval>
      </Link>
    </NetworkLink>

When I tried the above but I got the "not well formed (invalid token)"
error message on loading the network link KML file.

URLencoding the above <href> line to....

    <NetworkLink>
      <Link>
        <href>http%3A%2F%2Fwww.....%2FwriteKML.php%3Farga%3DA-BCDE
%26argb%3D2008-04-16</href>
        <refreshMode>onInterval</refreshMode>
        <refreshInterval>300</refreshInterval>
      </Link>
    </NetworkLink>

removes the error message and GE loads OK but I get the broken network
link icon (red dot)

If I hard code the arguments into the writeXML.php and remove the
arguments from the <href> element in the network link KML file
everything works fine.
That is ...

In writeXML.php ...
$arga = 'A-BCDE';
$argb = '2008-04-16'

In my network link KML file...
    <NetworkLink>
      <Link>
        <href>http://www...../writeKML.php</href>
        <refreshMode>onInterval</refreshMode>
        <refreshInterval>300</refreshInterval>
      </Link>
    </NetworkLink>

So the question is how can I pass arguments to a php script in a
network link?

I hope I have made my requirments/problems clear !!!


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KoflAIR  
View profile
 More options May 18, 10:46 am
From: KoflAIR
Date: Sun, 18 May 2008 07:46:29 -0700 (PDT)
Local: Sun, May 18 2008 10:46 am
Subject: Re: Problems passing arguments in <href> element under a network link

>         <href>http://www...../writeKML.php?arga=A-
> BCDE&argb=2008-04-16</href>

Try replacing the & sign in your URL by &amp;

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ManoM Google employee  
View profile
 More options May 18, 1:46 pm
From: ManoM
Date: Sun, 18 May 2008 10:46:06 -0700 (PDT)
Local: Sun, May 18 2008 1:46 pm
Subject: Re: Problems passing arguments in <href> element under a network link
Hi Tallywag,

As KoflAIR suggested, you can escape it using &amp;
http://code.google.com/apis/kml/documentation/kmlreference.html#httpq...
You can also use the <httpQuery> element:
     <NetworkLink>
       <Link>
         <href>http://www...../writeKML.php</href>
         <httpQuery>arga=ABCDE;argb=2008-04-16</httpQuery>
         <refreshMode>onInterval</refreshMode>
         <refreshInterval>300</refreshInterval>
       </Link>
     </NetworkLink>

http://code.google.com/apis/kml/documentation/kmlreference.html#httpq...

Mano

On May 17, 10:18 am, Tallywag wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tallywag  
View profile
 More options May 22, 8:06 am
From: Tallywag
Date: Thu, 22 May 2008 05:06:27 -0700 (PDT)
Local: Thurs, May 22 2008 8:06 am
Subject: Re: Problems passing arguments in <href> element under a network link
Thanks Guys....
I could have saved myself hours of trying different thing by asking
here first ;o)

On May 18, 6:46 pm, ManoM wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google