HighDots Forums  

Change order of elements each time a page is loaded?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Change order of elements each time a page is loaded? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
timsharp
 
Posts: n/a

Default Change order of elements each time a page is loaded? - 07-02-2006 , 11:15 AM






I'm trying to do a web page that lists products but I want to make it load the
products in a random order each time the page loads. Is there a way this can be
done without having to set up a database? If I did each product, say as a
library item, is there a bahaviour or a javascript out there that can read the
list of products, then load them in a random order?



Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Change order of elements each time a page is loaded? - 07-02-2006 , 02:20 PM






If you require that no product image load more than once on any page
refresh, then you will need to come up with some custom javascript, or use a
database/server-scripted method to do this.

I can tell you how to load images randomly, but not how to ensure that once
you have loaded one image you would not load it again on that page refresh.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"timsharp" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I'm trying to do a web page that lists products but I want to make it load
the
products in a random order each time the page loads. Is there a way this
can be
done without having to set up a database? If I did each product, say as a
library item, is there a bahaviour or a javascript out there that can read
the
list of products, then load them in a random order?





Reply With Quote
  #3  
Old   
timsharp
 
Posts: n/a

Default Re: Change order of elements each time a page is loaded? - 07-02-2006 , 03:18 PM



Thanks, but it's more than just the image I wanted to load, it's the whole
product description as well as several images. I thought if I made each product
into a library item, there might be a way to call them up onto the web page in
a different order each time - but of course I've no idea how to do this :-)


Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Change order of elements each time a page is loaded? - 07-02-2006 , 04:05 PM



No, sorry, you could not do that. You are trying to make a design-time
element (the library item) work at run-time, which cannot happen. You would
need to use some client-side technology, like javascript, or some
server-side technology, like ASP, CF, PHP, etc., do this work for you.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"timsharp" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks, but it's more than just the image I wanted to load, it's the whole
product description as well as several images. I thought if I made each
product
into a library item, there might be a way to call them up onto the web
page in
a different order each time - but of course I've no idea how to do this
:-)




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.