Loading ...
Sorry, an error occurred while loading the content.

Re: Is there something like for array?

Expand Messages
  • Paul Donahue
    Hi Hans, You need to use the window.location and location.search properties. Experiment with these functions: // originating doc function: function send() { //
    Message 1 of 3 , Jul 20 8:24 PM
    • 0 Attachment
      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@yahoogroups.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
      >
    • india_madesh
      ... you ... html ... to filename2050
      Message 2 of 3 , Jul 29 11:55 PM
      • 0 Attachment
        --- In JavaScript_Official@yahoogroups.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@yahoogroups.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
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.