Thanks for that example of passing the token with the same server call
William. It worked and now I'm trying to pass the token back in the
XML. Is it possible to call two different javascripts from one
onsubmit button?
My thinking is that I need to redefine "var coin" on my HTML page in
the same script. So the getcoin() function is undefined because it's
looking for it in "javascript.js" but it's at the top of the HTML.
I sent the token back in the XML as a PHP var $coin. This killed my
search results some reason, lol. Looking at the returned XML it is in
it's own marker row "<coin>". I was going to redefine var coin in the
getcoin(); function.
BTW I haven't changed the token in the PHP to ensure it's used only
once until I know it's being passed back from the server correctly.
On Oct 6, 2:13 pm, William <[EMAIL PROTECTED]> wrote:
> On Oct 7, 4:26 am, Lan Mind <[EMAIL PROTECTED]> wrote:
>
> > I'm worried about putting the PHP inside the
> > javascript, script inside a script?
>
> maybe the easiest way is to create a global variable as the first
> script in your homepage
>
> <script type="text/javascript">
> var DockhawkToken = "<?php echo $_SESSION['token'] ?>";
> </script>
>
> then append it to the URL when you call your javascript
>
> onsubmit="getMarks(this.action + '?name=' + escape(this.name.value) +
> '&token=' + DockhawkToken); return false;"
>
> function getMarks(url)
> {
> var request = GXmlHttp.create();
> request.open("GET", url, true);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---