You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Diwaker Gupta <di...@apache.org> on 2005/08/04 10:16:17 UTC
problem with javascript in contracts
I'm trying to make a contract for google maps. Here's the problem I'm facing:
Something like this in the contract works:
http://maps.google.com/maps?file=api
But this fails:
http://maps.google.com/maps?file=api&v=1
^^^
After plenty of trial and error, I think I'm pretty sure that the ampersand
symbol is causing problems. I'm trying to figure out where to start looking
-- Thorsten, can you help? :-)
Diwaker
--
Web/Blog/Gallery: http://floatingsun.net
Re: problem with javascript in contracts
Posted by Todd de Gruyl <to...@tdegruyl.com>.
On 8/4/05 04:16, Diwaker Gupta wrote:
> I'm trying to make a contract for google maps. Here's the problem I'm facing:
>
> Something like this in the contract works:
> http://maps.google.com/maps?file=api
>
> But this fails:
> http://maps.google.com/maps?file=api&v=1
> ^^^
> After plenty of trial and error, I think I'm pretty sure that the ampersand
> symbol is causing problems. I'm trying to figure out where to start looking
> -- Thorsten, can you help? :-)
I'm not Thorsten, but have you tried something like:
http://maps.google.com/maps?file=api&v=1
^^^^^
--
Todd de Gruyl
Mobile: 413.221.9450
Web: <http://www.tdegruyl.com>
Re: problem with javascript in contracts
Posted by Thorsten Scherler <th...@apache.org>.
I just tried
<a
href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=12310000&sorter/order=DESC&sorter/field=priority&resolutionIds=-1&component=12310083">views@issues</a>
and it is working fine.
On Sun, 2005-08-07 at 00:06 -0700, Diwaker Gupta wrote:
> Sorry for the late response guys, I've been tied up with work and school :)
>
> On Thursday 04 August 2005 2:25 am, Thorsten Scherler wrote:
> > You need to escape the "&". It depends on your contract but the subject
> > is javascript in contracts.
> > alert(unescape("http%3A//maps.google.com/maps%3Ffile%3Dapi%26v%3D1"));
>
> Tried this, but it outputs the stuff _as is_ in the generated page (that is, I
> want the HTML page to contain "file=api&v=1" and *not* "file%3Dapi%26v%3D1".
> I'm doing some more tests to see if that might actually work,
>
> > If you use plain xml then refer to
> > http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_xhtml_char
> >acter_entities
>
> Is this similar to what Todd suggested? That is, I just use & ? Do I need
> to explicitly invoke the xhtml-special.ent for this?
>
No, just use &
> > Like said by Cyriaque: "can you explain us exactly what you want to do
> > with your contract ?"
>
> Pretty simple actually :) I'm just trying to make a configurable contract that
> will let the user include a custom google map in his/her content. The
> configurable parameters being the API key and the location (and later on,
> other things that the Google Maps API supports)
>
Very nice. Looking forward.
> Diwaker
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
Re: problem with javascript in contracts
Posted by Diwaker Gupta <di...@apache.org>.
Sorry for the late response guys, I've been tied up with work and school :)
On Thursday 04 August 2005 2:25 am, Thorsten Scherler wrote:
> You need to escape the "&". It depends on your contract but the subject
> is javascript in contracts.
> alert(unescape("http%3A//maps.google.com/maps%3Ffile%3Dapi%26v%3D1"));
Tried this, but it outputs the stuff _as is_ in the generated page (that is, I
want the HTML page to contain "file=api&v=1" and *not* "file%3Dapi%26v%3D1".
I'm doing some more tests to see if that might actually work,
> If you use plain xml then refer to
> http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_xhtml_char
>acter_entities
Is this similar to what Todd suggested? That is, I just use & ? Do I need
to explicitly invoke the xhtml-special.ent for this?
> Like said by Cyriaque: "can you explain us exactly what you want to do
> with your contract ?"
Pretty simple actually :) I'm just trying to make a configurable contract that
will let the user include a custom google map in his/her content. The
configurable parameters being the API key and the location (and later on,
other things that the Google Maps API supports)
Diwaker
--
Web/Blog/Gallery: http://floatingsun.net
Re: problem with javascript in contracts
Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2005-08-04 at 10:31 +0200, Cyriaque Dupoirieux wrote:
> Diwaker Gupta a écrit :
>
> >I'm trying to make a contract for google maps. Here's the problem I'm facing:
> >
> >Something like this in the contract works:
> >http://maps.google.com/maps?file=api
> >
> >But this fails:
> >http://maps.google.com/maps?file=api&v=1
> > ^^^
> >After plenty of trial and error, I think I'm pretty sure that the ampersand
> >symbol is causing problems. I'm trying to figure out where to start looking
> >-- Thorsten, can you help? :-)
> >
> >
> Diwaker, can you explain us exactly what you want to do with your contract ?
> I am not Thorsten but I have already used such a url to include a
> counter in my page...
>
I am Thorsten. ;-) jeje
You need to escape the "&". It depends on your contract but the subject
is javascript in contracts.
http://www.salesianer.de/util/alert-umlaute.html It is a german side,
just add the text in the form an press "Code anzeigen".
http://maps.google.com/maps?file=api&v=1
gives
alert(unescape("http%3A//maps.google.com/maps%3Ffile%3Dapi%26v%3D1"));
If you use plain xml then refer to
http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_xhtml_character_entities
Like said by Cyriaque: "can you explain us exactly what you want to do
with your contract ?"
HTH
salu2
> Salutations,
> Cyriaque,
>
> >Diwaker
> >
> >
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
Re: problem with javascript in contracts
Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
Diwaker Gupta a écrit :
>I'm trying to make a contract for google maps. Here's the problem I'm facing:
>
>Something like this in the contract works:
>http://maps.google.com/maps?file=api
>
>But this fails:
>http://maps.google.com/maps?file=api&v=1
> ^^^
>After plenty of trial and error, I think I'm pretty sure that the ampersand
>symbol is causing problems. I'm trying to figure out where to start looking
>-- Thorsten, can you help? :-)
>
>
Diwaker, can you explain us exactly what you want to do with your contract ?
I am not Thorsten but I have already used such a url to include a
counter in my page...
Salutations,
Cyriaque,
>Diwaker
>
>