Using a random image generator in a frameset [was: "I'm a photographer, not a web designer!"]

I've been designing my own website for some years now using dreamweaver.  I love the ease of use and simplicity it offers, however I know nothing of designing web pages.  I know what I want but I just don't exactly always know how to get there.  I am currently trying to have a random image generator on my landing page, which is a frameset.  I've tried several codes that I've found online and have had no success, at all mind you, with any of them.  I'm sure that I am doing something very simple wrong with my design but just can't figure it out.  Unfortunately I am a photographer which makes me a visual person, so yes, if you can help me you'll have to draw a picture for me, or at least hold my hand and walk me through the steps.  Sorry, I know I'm high maintenance.
My site is all frameset based.  I have a 'mainFrame' that all other links in the other frames load to.  So I am assuming that my code for the image generator should go in the body of the mainFrame.  I have even copied and pasted all the code from some of the help I've found, downloaded a cfm to try, all to no avail.  Con someone spell it out for me, or better yet, draw me a picture.
[Subject line edited by moderator for clarity]

My site is all frameset based.
That's a tragedy.  Frames, once popular in the 90's are almost never used anymore.  In fact, the W3C saw fit to drop frameset support from HTML 5.
Why Frames are Evil:  http://apptools.com/rants/framesevil.php
Instead of Frames or Framesets, consider using Templates (DWTs) or Server-Side Includes (SSIs)
Guidance  on when to use DW Templates, Library Items and SSIs -
http://www.adobe.com/devnet/dreamweaver/articles/ssi_lbi_template.html
Below are several DHTML image rotation/slideshow scripts.  Just pick one and follow the instructions.
http://www.dynamicdrive.com/dynamicindex14/index.html
Good luck,
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com

Similar Messages

  • How to use Math.random() to generate an integer within a range

    How can I generate a random integer from 1 to 10 using the Math.random() method?
    Thanks.

    Then why do i get this compile-time error?
    found   : double
    required: int
                        matrix[i][j] = (int) 11 * Math.random();
    matrix is an array of integers:
    String colNumStr = JOptionPane.showInputDialog("Please specify the number of rows");
        String rowNumStr = JOptionPane.showInputDialog("Please specify the number of columns");
        int rowNumInt = Integer.parseInt(rowNumStr);
        int colNumInt = Integer.parseInt(colNumStr);
        int [][] matrix = new int [rowNumInt][colNumInt];

  • IWeb random image generator javascript issue

    This is the thread I'm curious about See below.
    http://discussions.apple.com/thread.jspa?threadID=1552040
    I followed these steps and nothing happened. I'm not quite sure if I did everything right. I dragged the images from my iPhoto albums onto the page, sized them, gave them a 0% opacity and laid them all on top of each other.
    Then I pulled the HTML Snippet widget onto the page and entered the script as you posted. I entered my file names (only the last part instead of the full address: image.jpg) and sized the snippet.
    Nothing happened. I noticed this was an older post. I'm currently using iWeb '09. Is there something different in the newer version??
    Any advice would be helpful! Thanks!

    I've now been sitting looking for this for a while. I don't seem to be able to get it to work.
    Do I need to host to a folder first and then to the FTP server after?
    I don't seen to be able to find the new page (TEST PAGE) in the folder I used to publish the site to before I went online. Tried searching for it in finder but I don't get any results on (TESTPAGEfiles).
    I can see what you are talking bout I only publish to a local folder but I want to publish via the FTP option in iWeb.
    Thank you very much for helping me

  • Applescript: how to record and return how many times a number appears when using a random number generator

    I create one rng and repeat another rng that many times like so:
    set x to (random number from 0 to 250)
    repeat x times
      set rn to (random number from 1 to 10)
    end repeat
    now what i would like to do is record and return how many times 'rn' comes up with one particular number. Any ideas?

    You could set up a list and increment the contents of a particular index each time it comes up, for example:
    set how_many to {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -- 1 thru 10
    set x to (random number from 0 to 250)
    repeat x times
      set rn to (random number from 1 to 10)
      set item rn of how_many to (item rn of how_many) + 1
    end repeat
    return how_many

  • I have received email saying my Apple ID has been used to purchase a Camera from AppStore,purchaser was from Poland.I have not purchased such item, am being asked to verify my details/password etc.Is this Junk mail or spam?

    Have received email saying my Apple ID has been used to purchase a Camera, the purchase was from Poland. It is asking me to verify me details and change password etc.
    This email went into my Junk Mail.
    Question is...do I just ignore it or what?

    Scam, as in phishing email.
    http://www.macintouch.com/readerreports/security/index.html

  • Stopping the same random image

    Hi,
    I am loading 8 images into 8 movie clips using a random
    number generator. it is working but it loads in the same images in
    places. I need the 8 images to be different. They are being loaded
    from a mySQL database using php. Does anyone have any tips?
    I'm using this actionscript code.
    var mcLoader2:MovieClipLoader = new MovieClipLoader();
    //set up a Listener
    var mclistener2:Object = new Object();
    //associate the Listener with the MCL
    mcLoader2.addListener(mclistener2);
    _parent.rand = random(_parent.randtotal)
    //set up Event functions
    mclistener2.onLoadStart = function(target_mc:MovieClip):Void
    //do stuff when load starts
    _parent.rand = random(_parent.randtotal)
    loadingtext.text = "initialising"
    //browseSender.sendAndLoad("browserand.php",browseReceiver,"POST");
    mclistener2.onLoadProgress = function(target_mc:MovieClip,
    bytesLoaded:Number, bytesTotal:Number):Void {
    //do stuff when load is in progress, like update a progress
    bar
    loadingtext.text = "loading";
    mclistener2.onLoadInit = function(target_mc:MovieClip):Void {
    //randSender.sendAndLoad("rand.php",randReceiver,"POST");
    //do stuff when load is complete
    //test.text = "hi";
    browse2._xscale = 40;
    browse2._yscale = 40;
    //load the first image
    //imgHolder_mc is a MovieClip on the Stage
    mcLoader.loadClip(this["image" + _parent.rand], browse1);
    thanks
    Gavin

    Here is my entry for this problem.

  • PHP random image

    Hello everyone,
    Im trying to use (for the first time) random images generated
    by PHP. I
    installed a Technorama extension and then followed thru the
    steps to place a
    random image in the page, but there is nothing there when I
    browse the page.
    Please forgive my ignorance, but I have never done any php
    stuff before.
    And yes, the files are uploaded to my server. (which does
    have php enabled).
    The practice page I am using is
    www.fionahayward.com/interiordesign/practice.php
    I have the effect working with javascript on this page
    www.fionahayward.com/interiordesign but am trying to use php
    incase people
    have javascript turned off.
    Maybe its something to do with how Ive set up Server
    Behaviours or something
    (only guessing)
    Thanks for listening
    Fiona

    1) create a php file named rotate.php in the folder where the
    images are.
    2) paste this code (between the [code ] and [/code]
    markers... into that file and save it.
    [code]
    <?php
    $folder = '.';
    $extList = array();
    $extList['gif'] = 'image/gif';
    $extList['jpg'] = 'image/jpeg';
    $extList['jpeg'] = 'image/jpeg';
    $extList['png'] = 'image/png';
    // --------------------- END CONFIGURATION
    $img = null;
    if (substr($folder,-1) != '/') {
    $folder = $folder.'/';
    if (isset($_GET['img'])) {
    $imageInfo = pathinfo($_GET['img']);
    if (
    isset( $extList[ strtolower( $imageInfo['extension'] ) ] )
    file_exists( $folder.$imageInfo['basename'] )
    $img = $folder.$imageInfo['basename'];
    } else {
    $fileList = array();
    $handle = opendir($folder);
    while ( false !== ( $file = readdir($handle) ) ) {
    $file_info = pathinfo($file);
    if (
    isset( $extList[ strtolower( $file_info['extension'] ) ] )
    $fileList[] = $file;
    closedir($handle);
    if (count($fileList) > 0) {
    $imageNumber = time() % count($fileList);
    $img = $folder.$fileList[$imageNumber];
    if ($img!=null) {
    $imageInfo = pathinfo($img);
    $contentType = 'Content-type: '.$extList[
    $imageInfo['extension'] ];
    header ($contentType);
    readfile($img);
    } else {
    if ( function_exists('imagecreate') ) {
    header ("Content-type: image/png");
    $im = @imagecreate (100, 100)
    or die ("Cannot initialize new GD image stream");
    $background_color = imagecolorallocate ($im, 255, 255, 255);
    $text_color = imagecolorallocate ($im, 0,0,0);
    imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
    imagepng ($im);
    imagedestroy($im);
    ?>
    [/code]
    4) in whichever file you want the random images to appear,
    reference the image so:
    src="path/to/that/image/folder/rotate.php"
    I tend to use root-relative pathing, but that part is up to
    you.
    NOTE: I've found that random image references are quirky in
    IE browsers - they seem to want the image width and height to
    display images that are dynamically selected... I've used this
    script to display images that are all the same size and groups that
    aren't. When the image size is unknown, I use width:100%
    height:100% in my css)
    email me if you have any issues with using the script. I use
    it a lot with WordPress sites, but it isn't a WP only solution.
    syncbox AT gmail DOT com (do the obvious)
    HTH

  • PHP Random Image extension

    I am trying to use the PHP random image generator but I don't
    know where to specify the size I want all the pictures to come up
    in the code. I created a "php" test page and inserted said code
    where I want the images to display but they are too large and throw
    the entire page off. Is there a way to tell it that all pictures
    should be called up at 240(width) x 350(height)? Any help would be
    greatly appreciated. The reason I am doing this is because there
    are about 200 images (of students) in this folder and coding each
    picture seperately is too time consuming.
    Regards,
    RM (using DW MX2004)

    Disregard....I figured it out. As it turns out the best
    solution would be to have your original pictures saved with the
    desired dimensions. I was able to point the PHP to a directory that
    contained pictures with said dimensions and it worked like a charm.
    regards.

  • Choose random image script

    I'm creating a small movie with a set of random images that all appear in the same spot (no horizontal or vertical movement). I want each image to appear onscreen for two seconds, then be replaced by another randomly-chosen image. There are 17 images in the set. Here is the script I'm using:
    on enterFrame
      channel=random(17)
      _movie.delay(2*60)
    on exitFrame
      go to the Frame
    end
    This script works well. However, because the population is small - only 17 - what happens when I run the script is that a little too often it randomly chooses the same image once, twice, sometimes up to five times in a row, which gives the effect that the movie is either stuck or not working properly. I would like to find out how to modify the script so that on exitFrame it chooses randomly any of the other 16 images but not the current image. At first I thought if the script read random(16) or random(17-1) that might work, but it doesn't.
    Any thoughts would be welcome.
    Dallas

    Hi Sean,
    This randomizing project of mine is becoming more complex than I first realized and I now have another question that I hope you might be able to help me with.
    The project breaks down into class, category, group and member. There are 9 classes (and perhaps a possibility in the future that further classes could be added). The structure and naming convention within each class is identical down to the member level. For example, Cat. 1 of Class 2 and Cat 1 of Class 7 both have the same names. Group 3 of Cat. 1 of Class 2 and Group 3 of Cat 1 of Class 6 both have the same names. However, the members of these groups do not have the same names.
    In each class there are 4 categories, each with a different name. Each category contains a number of groups (each group has a different name). Each group contains a number of members. Each member in categories 1 and 2 is a bitmap image. The total number of bitmap members in the project is 21.
    To give a fictionalized example (this project is not about clothing, but I'm using it as an example):
    Class 1 = shirts
    Class 2 = hats
    Class 3 = pants
    Class 4 = socks
    Class 5 = shoes
    etc.
    Category 1 = British
    Category 2 = Japanese
    Category 3 = Turkish
    Category 4 = Brazilian
    Group 1 = Cotton
    Group 2 = Synthetic
    Group 3 = Speed
    Group 4 = Sound
    and so forth.
    In Class 1 (shirts) there are British, Japanese, Turkish and Brazilian shirts and these could be made of either cotton or synthetic. In addition, there are a variety of speeds and sounds from which to choose when displaying the shirts.
    In my project:
    Cat. 1 has 7 groups and each group varies in the number of members with either 7, 14 or 21 (but no other alternative to these numbers).
    Cat. 2 has 13 groups and each group has 7 members.
    Cat. 3 does not randomize images but lets me choose any one of 12 different speeds for randomization in half-second increments.
    Cat. 4 does not randomize images but lets me choose any one of 6 different sounds. Whenever the randomized image changes, this triggers the sound. The sound is not randomized but is consistent once the choice for what KIND of sound has been made. In short: tick, tick,tick, or tock, tock, tock but not tick, tock. It is possible that in the future more sounds could be added.
    Navigation should allow me to start with any of the four categories. For randomization to work, I must choose within either Cat. 1 or Cat. 2 (but not both) and I must make a choice of some sort within Cat. 3 (speed of randomization) while Cat. 4 is entirely optional (sound on or off, but not required to be on and, if it's to be on then choice for which kind of sound).
    There are also an additional two buttons for sound on or off than run the length of the score within any class, meaning that while randomization is occuring anywhere within a class, I can choose to turn the sound on if it's currently off or off if it's currently on. Turning it on while randomization is taking place will also probably require a choice of which kind of sound (meaning a floating window I suppose) so as not to exit the frame where randomization is taking place.
    Now for my question: should I create one massive behaviour script for all classes that includes a series of nested if/else statements for each category, group and member, or should I create 4 large behavior scripts, one for each category with if/else instructions for its groups and members, or should I script at the group level, which will result in 180 separate behaviour scripts for image randomization plus additional scripts for speed and sound?
    Further, I understand how to apply at the group level the script you gave me earlier (and it works beautifully), but if you think it would be more efficient now to work at the category or class level, I'm not sure how to script the if/else statements. I'm assuming that in whichever of these solutions turns out to be best, it is applied to a single sprite which will serve to display the randomly-chosen image. Bear in mind that the script you gave me randomizes the image change every two seconds. Now I'm looking to have a choice of it changing within a range of once every half-second to once every 5 seconds (e.g. 0.5 sceonds, 1 second, 1.5 seconds, 2 seconds, etc.).
    An ancillary question: could this be done a different way? A friend suggested using subroutines but wasn't able to tell me how to do this because he doesn't know anything about Lingo. I was wondering whether the if/then syntax structure is Lingo's way of doing subroutines.
    Your thoughts would be most welcome. If you think you can't help me with this, do you have any suggestions as to where I might turn for help (apart from the nuthouse at this point)?
    Cheers,
    Dallas

  • Browser triggered random image

    Could someone please help me create a random image action? I thought I could use the randomimage in the "action" window, but this requires a "mouse enter" or "mouse click" etc. How do I get the images to simply change each time the page is refreshed?
    GoLive help tells me to create a browser triggered action, but this is not an option in the action tab. ???

    In article <[email protected]>,
    [email protected] wrote:
    > How do I get the images to simply change each time the page is refreshed?
    In this case you need to use the Random Image action as a HEAD action,
    triggered by page load.
    Place your base image on the page and name it. Then drop a head action
    item from the Objects palette (watch the tooltips) onto the page; the
    head section of the page will now spring open. With the icon selected
    assign the Random Image action to it, set it to run onLoad and select
    your base image.
    That's it.
    Cheers Martin

  • Using PHP to display semi-random images?

    Hello,
    I'm looking for help using PHP and MySQL to generate semi-random images on my web site. Here's what I'm trying to do: I have 60 images, but I only want to display 16 at a time (for examlpe http://artisdead.net/antelopegardens.php).
    The way I imagine this is, the design has 16 image placeholders. I want Placeholder 1 (the first image) to randomally pull record ID 1, 2, or 3 from the SQL database, while Placeholder 2 pulls record ID 4-6, etc. It's important that one of the first 3 images displays first, while one of the second 3 images displays next, etc.
    I've found various ways to randomize all the images, but I'm not understanding how to constrain the randomization the way I'm looking to. Any help would be greatly appreciated. Thanks in advance.

    Alamo_Melt wrote:
     The way I imagine this is, the design has 16 image placeholders. I want Placeholder 1 (the first image) to randomally pull record ID 1, 2, or 3 from the SQL database, while Placeholder 2 pulls record ID 4-6, etc. It's important that one of the first 3 images displays first, while one of the second 3 images displays next, etc.
    Before offering a possible solution, I should point out that your plan has a minor flaw. If you display only 16 images, and want the random choice to come from incremental sets of three, the maximum number you can have in your set is 48. The final 12 images will never be selected. For 60 images, you need 20 placeholders. The alternative is to have a total set of 64 images, and make the random choice come from incremental sets of four images.
    With that caveat, here's how I would do it. The primary keys of your records might not be consecutive, particularly if records are deleted and new ones added, so it might be a good idea to have a separate column with consecutive numbers from 1 to the the maximum. To select random numbers from incremental groups of three, use the following:
    $id = array();
    $min = 1;
    $max = 3;
    for ($i = 0; $i < 16; $i++) {
      // generate random number from current set
      $id[$i] = mt_rand($min, $max);
      // increment the minimum and maximum numbers for the next set
      $min += 3;
      $max += 3;
    // join the selected values as a comma-separated string
    $vals = implode(',', $id);
    $sql = "SELECT image FROM images WHERE id IN ($vals)";
    // excecute the SQL query

  • Generating random image application

    Please someone help me design a program that could generate image randomly.
    I have a BIKE and CAR. There are 3 picture in a the BIKE and and 3 in the CAR.
    This program probably uses SWING GUI type of programming.
    If I run the program, there would be a button of a BIKE and a button for a CAR. If I click the BIKE button, another frame(GUI) will appear.
    If I click the CAR button, another frame(GUI) will appear as well.
    The Bike and Car frame must be able to show image randomly everytime i click the Bike or Car button.
    How do i create this. Pls help.
    I would like to know this ASAP. PRONTO. Possibly NOW!

    using Math.random()*3, you can assign that to an integer and then perform if-else statements to get 3 different images... You can do so with the car too.. Hope you understand and hope this helps.

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • Using Kaosweaver advanced random images

    Very much a beginner trying to improve a web site I built for
    a vacation rental by adding a small slide show.
    Using Dreamseaver 4, Kaosweaver advanced random immages.
    Following directions but do not see any immages on home page,
    get two icons in the upper left corner. In the Kaosweaver box, I am
    not entering anything in link or target. All immages are in the
    root directory for the web site I am building.
    What am I doing wrong.

    I don't know if this is THE problem - but it's A problem.
    Your code has
    absolute references to the files on your computer, rather
    than relative
    paths from the HTML file itself. Your code has this (several
    times):
    KW_ARI[KW_ARI.length]='/|/Documents and
    Settings/HP_Administrator/My
    Documents/Colorado/Web 06/homepage_deck_flash.jpg';
    It should be:
    KW_ARI[KW_ARI.length]='homepage_deck_flash.jpg';
    or
    KW_ARI[KW_ARI.length]='images/homepage_deck_flash.jpg';
    or whatever the relative path to your images is.
    Alec Fehl, MCSE, A+, ACE, ACI
    Adobe Community Expert
    AUTHOR:
    Microsoft Office 2007 PowerPoint: Comprehensive Course
    (Labyrinth
    Publications)
    Welcome to Web Design and HTML (Labyrinth Publications)
    CO-AUTHOR:
    Microsoft Office 2007: Essentials (Labyrinth Publications)
    Computer Concepts and Vista (Labyrinth Publications)
    Mike Meyers' A+ Guide to Managing and Troubleshooting PCs
    (McGraw-Hill)
    Internet Systems and Applications (EMC Paradigm)

  • Pseudorandom-number generator used in Random method

    Hi,
    As you know whenever the Random method in Math class is called, it creates a single new pseudorandom-number generator to generate the random values. This new pseudorandom-number generator is then used thereafter for all calls to this method and is used nowhere else.
    However, i would appreciate it if anybody can give me the details of this pseudorandom-number generator
    Thanks,
    RMP

    Reza_mp wrote:
    It doesn't change anything that i am doing..I just need that for one part of my testing project... especially i need its mathematical model.. Anyhow, if you know it just direct me to the point if you don't know just leave it..To the best of my knowledge, most pseudo random number algorithms use a linear congruential generator. You could try googling for it, or Donald Knuth - The Art of Computer Programming.
    Winston

Maybe you are looking for

  • Doesn't work wi-fi. Problems with battery.

    Doesn't work wi-fi. Battery is too bad, i charge my phone 2 times per day. Before problems with wi-fi battery was normal.

  • Getting Service for my MacBook Pro

    I bought the MacBook Pro around the first of April this year and have overall been happy with the exception of two problems. First, the computer fails to recognize the Airport card (in either OSX or XP). It is like it is not plugged in. This occurs a

  • Double space for period. How about comma, too?

    It's already kosher with the interface guidelines to double space at the end of a sentence to get a period, so how do I get people on the bandwagon to make the spacebar a dual- or tri-function spacebar: double tap for a comma, period, or question mar

  • PCP Implementation

    Hello, Has anybody implemented Personnel Cost Planning and Simulation? If yes can you please respond back because I'm not able to get the system working correctly based on what the HELP doc's mentioned. One of the key question is when I'm doing data

  • Data Manager Dynamic Script - Documents or Materials that help me to write

    I need to configure a package to have input at run time for that I've to code in Data Manager Dynamic script editor. I'm newbie to SAP BPC, could anybody help me for getting some material on this area. Thanks, Saravana Prabhu