[Javascript] thumbnails displayed on one html page

Dave schemer at cyou.com
Sat Dec 8 07:59:08 CST 2001


Hi Peter,
    Thanks for the quick response on my question. I will use this info and try to make
it work again and then if I have a problem I can ask another more specific question.
What book would you consider to be the best on Javascript? I have found that when
buying books that I usually end up with about 10-20 books on the same subject as not
all books are created equal, and some books have more info or are written in an easier
to learn fashion. I tend to favor O'Reilly or Wrox..I would like your honest opinion
of a book that I should get.....
Thank you,
Dave

Peter Brunone wrote:

> Dave,
>
>         In server-speak, the parameters after the ? in the URL are called the
> querystring.  In the client side world... well, I don't know what to call
> them, so we'll just keep calling them that :-)
>
>         Using the window.location.href property, you can get the entire URL of the
> current page (including parameters that you append).  The correct syntax for
> appending parameters is as follows:
>
> http://www.domain.com/directory/file.html?param1=this&param2=that
>
> and so on.  When you grab this entire string using window.location.href, you
> can then parse the URL for the pieces you want using the .substring and
> .indexOf methods and the .length property of your string.  For example, if
> you wanted the piece of the above URL (after putting it into a variable
> called strURL) after the question mark, you would do the following:
>
> strParams = strURL.substring(strURL.indexOf("?"), strURL.length);
>
>         You could then split up the pieces further.  I suggest you pick one of the
> Javascript resources from
> http://www.mountaindragon.com/javascript/resources.htm or a good book and
> read up on the string methods.
>
>         Alternatively, you could do this server-side with PHP, ASP, PERL, or
> another scripting environment.  For what it's worth, I find server-side
> methods easier and more powerful for dynamic content like this, but what you
> want is still attainable with client-side Javascript.
>
> Cheers,
>
> Peter
>
> |-----Original Message-----
> |From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
> |Behalf Of Dave
> |Sent: Friday, December 07, 2001 8:21 PM
> |To: javascript at LaTech.edu
> |Subject: [Javascript] thumbnails displayed on one html page
> |
> |
> |Hi,
> |    I am not an expert so I have come to find help on an operation I
> |have seen work, but cannot get it to work for me. I want to display
> |pictures created with thumbnails with the output going to a single html
> |page so I can retain my background to match my website. This is opposed
> |to the full sized image being displayed on a white background and in the
> |upper left hand corner. I have heard of a "?" extension (in html 4.01)
> |being applied to an html document in the URL address with everything
> |being set after a "?" in a document, accessable from javascript in the
> |opened document. You can then use it to send the filename of the image
> |to be opened on that page. Does anybody know how to do that?
> |Thanks,
> |Dave
> |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20011208/9e26ba17/attachment.htm>


More information about the Javascript mailing list