Re: Is there something like <a
name=#filename2050> for array?
United States
2007-07-20 22:24:32
Hi Hans,
You need to use the window.location and location.search properties.
Experiment with these functions:
// originating doc function:
function send() {
// target destination:
var urlDestination = "target.html";
// destination filename:
var myFileName = "file007.jpg";
// build the "query" or "search" string
urlDestination += "?" + myFileName;
// go there:
window.location = urlDestination;
}
// destination function:
function getSearchString() {
var searchString = location.search;
// shows "?file007.jpg":
alert("search string contains = " + searchString);
}
Of course you will need to parse the parameters in a URL search
string if there are multiple name-value pairs. At the very least you
will need to get rid of the "?".
Paul
--- In JavaScript_Official%40yahoogroups.com">JavaScript_Officialyahoogroups.com, "hwitche" <hwitche...>
wrote:
>
> I have a slideshow which takes the information for the image and
> description from an array like this:
>
> "1|filename1|Title1|more information1",
> "2|filename2|Title2|more information2",
> ...
> "2050|filename2050|Title2050|more information2050",
> "2051|filename2051|Title2051|more information2051"
> ...
>
> Now I would like to invoke the slideshow from a link in another html
> file BUT with the capability of jumping directly to "filename2050"
and
> running the show from that point on forward.
>
> Question: How can I pass the value "filename2050" to my
slideshow.html? >
> Thank you for your hints.
>
> Hans
>
Re: Is there something like <a
name=#filename2050> for array?
United States
2007-07-30 01:55:00
--- In JavaScript_Official%40yahoogroups.com">JavaScript_Officialyahoogroups.com, "Paul Donahue"
<scramjetter...> wrote:
>
> Hi Hans,
>
> You need to use the window.location and location.search properties.
>
> Experiment with these functions:
>
> // originating doc function:
>
> function send() {
> // target destination:
> var urlDestination = "target.html";
> // destination filename:
> var myFileName = "file007.jpg";
> // build the "query" or "search" string
> urlDestination += "?" + myFileName;
> // go there:
> window.location = urlDestination;
> }
>
>
> // destination function:
>
> function getSearchString() {
> var searchString = location.search;
> // shows "?file007.jpg":
> alert("search string contains = " + searchString);
> }
>
> Of course you will need to parse the parameters in a URL search
> string if there are multiple name-value pairs. At the very least
you
> will need to get rid of the "?".
>
> Paul
>
>
>
>
>
> --- In JavaScript_Official%40yahoogroups.com">JavaScript_Officialyahoogroups.com, "hwitche" <hwitche>
> wrote:
> >
> > I have a slideshow which takes the information for the image and
> > description from an array like this:
> >
> > "1|filename1|Title1|more information1",
> > "2|filename2|Title2|more information2",
> > ...
> > "2050|filename2050|Title2050|more information2050",
> > "2051|filename2051|Title2051|more information2051"
> > ...
> >
> > Now I would like to invoke the slideshow from a link in another
html > > file BUT with the capability of jumping directly
to "filename2050"
> and
> > running the show from that point on forward.
> >
> > Question: How can I pass the value "filename2050" to my
> slideshow.html?
> >
> > Thank you for your hints.
> >
> > Hans
> >
>