Click here to get back home

how to load a different image on a web page

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to load a different image on a web page ipy2006 02-05-2007
Posted by ipy2006 on February 5, 2007, 12:09 pm
Please log in for more thread options


Other than the JavaScript of timing and rotating images every few
seconds or minutes, is there a way to uniquely load a different
picture every time a browser open a page?
Thanks,
yip


Posted by Ben Bacarisse on February 5, 2007, 1:03 pm
Please log in for more thread options



> Other than the JavaScript of timing and rotating images every few
> seconds or minutes, is there a way to uniquely load a different
> picture every time a browser open a page?

This is a case for a server-side script. It is a matter of a few
minutes and will work for all your visitors (that view images).

The "other than" is rather odd since JS will not work "every time" but
only some times.

--
Ben.

Posted by ipy2006 on February 5, 2007, 2:14 pm
Please log in for more thread options


> > Other than the JavaScript of timing and rotating images every few
> > seconds or minutes, is there a way to uniquely load a different
> > picture every time a browser open a page?
>
> This is a case for a server-side script. It is a matter of a few
> minutes and will work for all your visitors (that view images).
>
> The "other than" is rather odd since JS will not work "every time" but
> only some times.
>
> --
> Ben.

Thanks for the reply. If you look at http://www.nyu.edu everytime you
open this url in a browser you will see a new <div> element. Do you
think it is created by a server side script or by some Ajax code? From
my observation I don't see any server side code there. Please comment.

<div id="photography">
        <img src="/v50/images/photos/42/4x2_35980Pg20.jpg" alt="" />
</div>


Posted by Mumia W. (NOSPAM) on February 5, 2007, 5:46 pm
Please log in for more thread options


On 02/05/2007 01:14 PM, ipy2006 wrote:
>>> Other than the JavaScript of timing and rotating images every few
>>> seconds or minutes, is there a way to uniquely load a different
>>> picture every time a browser open a page?
>> This is a case for a server-side script. It is a matter of a few
>> minutes and will work for all your visitors (that view images).
>>
>> The "other than" is rather odd since JS will not work "every time" but
>> only some times.
>>
>> --
>> Ben.
>
> Thanks for the reply. If you look at http://www.nyu.edu everytime you
> open this url in a browser you will see a new <div> element. Do you
> think it is created by a server side script or by some Ajax code? From
> my observation I don't see any server side code there. Please comment.
>
> <div id="photography">
>         <img src="/v50/images/photos/42/4x2_35980Pg20.jpg" alt="" />
> </div>
>

Server-side code is executed on the server to (typically) generate the
HTML that you see. You can probably do what you're trying to do by using
a combination of a cookie and a server-side script.


--
Windows Vista and your freedom in conflict:
http://www.securityfocus.com/columnists/420/2

Posted by Ben Bacarisse on February 5, 2007, 5:49 pm
Please log in for more thread options



>> > Other than the JavaScript of timing and rotating images every few
>> > seconds or minutes, is there a way to uniquely load a different
>> > picture every time a browser open a page?
>>
>> This is a case for a server-side script. It is a matter of a few
>> minutes and will work for all your visitors (that view images).
>>
>> The "other than" is rather odd since JS will not work "every time" but
>> only some times.
>>
>
> Thanks for the reply. If you look at http://www.nyu.edu everytime you
> open this url in a browser you will see a new <div> element. Do you
> think it is created by a server side script or by some Ajax code? From
> my observation I don't see any server side code there. Please
> comment.

The photos appear (and change) when all client-side scripting is off
so a server-side script is probably generating the changed content.
You say you can't see any server code there, but server-side code is
almost always hidden.

There is also a lot of client-side scripting on the page so when that
is active it may also do changing the content. I did not try to find
out what any of it did. Browser sniffing, like glue sniffing, makes
my head hurt.

--
Ben.

Similar ThreadsPosted
How do I automatically load a different page ? November 10, 2004, 1:04 pm
Troubleshooting page load delays: Whats the best approach? Software? July 26, 2006, 3:15 pm
Can I specify that some images load before others? December 1, 2005, 6:41 am
wget -p does not load my images October 25, 2006, 11:52 am
Impact of images on load performance November 29, 2004, 2:49 pm
Textarea style not applied on first load November 22, 2007, 4:29 pm
Image that scrolls with the page? January 21, 2005, 7:57 am
Show image top left in html page, how can I do that ? June 11, 2006, 8:59 am
Splitting image at page break disappears when printing. September 30, 2004, 4:24 pm
Creating image maps with Adobe Illustrator or Image Ready. March 8, 2005, 12:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap