View Full Version : Help with Window Widget

04-27-2007, 05:21 AM
) Script Title: DHTML Window widget (v1.01)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/index.htm

3) Describe problem:

Hi All,

This might be a bit of a left field question, but I am currently utilising the window widget dhtml script to inform customers of our current specials via loading a graphic internally in the window.

What I would like to do if possible would have a directory of files and have the widget randomly pick a graphic too display for months where we run multiple specials.

I also want to build in the ability to "see other specials" by clicking a link and it loading the next image in order... but I think I can manage that one myself.

any ideas to the random problem?

oh, if required this is my site currently with the widget in action: http://www.gcphotography.com.au if that helps any...

I can also post code or any more information.

Kind Regards,


04-27-2007, 05:47 AM
Well, a random image JavaScript (http://www.javascriptkit.com/script/cut144.shtml) may do the trick depending on your needs. If you want something that automatically scans a directory of files to pick one from, you'll need a server side script for that, such as PHP. Since you're using the iframe option to load a DHTML window, the page to load can in fact be a .php page itself that does what you want.

04-27-2007, 06:10 AM
I think the random image javascript should do the job.

Any tips on implementing it into the window widget code?

04-27-2007, 09:11 AM
Basically all you're doing is inserting the desired script inside the page that's being shown in the iframe. There's no extra step involved because of the DHTML widget script per say.

05-16-2007, 07:23 AM
I put in the randomiser code... worked a treat...

I also put in a java code to refresh the page every 15 seconds:

<META HTTP-EQUIV="refresh" CONTENT="15">

I'm wondering because I used that is there another peice of code I can use to act as a pause button for this peice of code, or do I need a whole packaged developed accordingly for that?