Question about Using the JQuery Query String Object

20 views
Skip to first unread message

John Tynan

unread,
Sep 11, 2008, 2:31:44 PM9/11/08
to opensourceb...@googlegroups.com
It turns out that after people have gone through the process of
building their query here:

http://npr-simile-timeline.googlecode.com/svn/trunk/newsample.html

And when they click on the link to "get the code"... asking people to
include javascript in the head and body of the page where they would
like to include the npr timeline is too prohibitive.

With that in mind, I'm thinking that it's probably best to just give
people the code for an iframe instead (see attached).

To make this work, the iframe needs to accept a url with some
variables in the query string.

To manage the query string, I'm thinking of using the JQuery Query
String object (also attached).
http://plugins.jquery.com/project/query-object

However, I'm new to JQuery and the Query String object.

What I'd like to do is take the variables from the url and use them to
build the timeline.

If you have some expertise in JQuery or some time and the desire to
learn (or if you think this is best done in javascript alone) any
suggestions you might have for doing this is most appreciated.

Thanks kindly,

John T.

--
http://johntynan.com
http://openid.johntynan.com/john

jquery.query-2.0.0.js
iframe.html
widget.html

johntynan

unread,
Sep 12, 2008, 5:40:30 PM9/12/08
to opensourcebroadcasting
The fix could not be simpler:

var query = window.location.search;

From now on, I'm keeping my javascript reference within arm's length.

If you do not have your email settings for this group set to digest
mode, sorry about the repeated emails about svn commits.

Best regards,

John T.

On Sep 11, 11:31 am, "John Tynan" <jgty...@gmail.com> wrote:
> It turns out that after people have gone through the process of
> building their query here:
>
> http://npr-simile-timeline.googlecode.com/svn/trunk/newsample.html
>
> And when they click on the link to "get the code"... asking people to
> include javascript in the head and body of the page where they would
> like to include the npr timeline is too prohibitive.
>
> With that in mind, I'm thinking that it's probably best to just give
> people the code for an iframe instead (see attached).
>
> To make this work, the iframe needs to accept a url with some
> variables in the query string.
>
> To manage the query string, I'm thinking of using the JQuery Query
> String object (also attached).http://plugins.jquery.com/project/query-object
>
> However, I'm new to JQuery and the Query String object.
>
> What I'd like to do is take the variables from the url and use them to
> build the timeline.
>
> If you have some expertise in JQuery or some time and the desire to
> learn (or if you think this is best done in javascript alone) any
> suggestions you might have for doing this is most appreciated.
>
> Thanks kindly,
>
> John T.
>
> --http://johntynan.comhttp://openid.johntynan.com/john
>
>  jquery.query-2.0.0.js
> 9KViewDownload
>
>  iframe.html
> < 1KViewDownload
>
>  widget.html
> 2KViewDownload
Reply all
Reply to author
Forward
0 new messages