Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    My Site: http://www.faceplatesgrillz.com
    If you go to the styles page you can see that I have a couple of forms. This entire site is still under development and nothing is concrete so nobody has to let me know how bad it looks. Anyways, I am trying to set it up so when you select what you want in the drop down lists the picture will change in the form. Can someone please help me out or at least point me in the right direction? I would really appreciate it and would love to implement this feature on the site.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    I can get you pointed ...

    You'll be looking for some Javascripting that uses the <option> property
    in your form. When there is a change (onchange), it will run a Javascript
    that targets an inline frame <iframe> ... that's where your photos will
    appear when the option is changed. People will scoff at using <iframes>,
    but it allows your photo to change smoothly, without refreshing the page.

    I like <iframes> ( NOT <frame>, but <iframe> ... don't get them confused ).

    They work on all browsers and very flexible. You can also put <iframe>'s inside
    of a <div> for proper positioning. There is also some php scripting that will
    center a photo vertically inside of an <iframe>... let me know if you need that too.


  4. #3
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    you dont by any chance have any example of some codes with iframes. I have not checked anywhere else since i have read this message and am going to do that now. But if you have something that might help that would be great.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    I've got a good demo script for you, and it uses only <div>'s ... no <iframes>

    http://www.catpin.com/grillz

    When you view it, click on an option (it will take a second to load until you
    have it in your cache). Or, you can make the images smaller and they'll load faster.

    Click your "View", "HTML Source" (or "Source") to see the HTML/Javascripting


    Those grillz are pretty neat!


  6. #5
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    People will scoff at using <iframes>,
    but it allows your photo to change smoothly, without refreshing the page.
    you can also achive that by using
    Code:
    document.getElementById('THE_IMAGE').src = 'the_URL'
    as the code within the function called, page does not have to be reloaded and it does not take an iframe
    Thee Pyro Wolf

  7. #6
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    Mlseim - For some reason that form you set up dose not work for me. Dose it work for anyone else? I tried playing around with it in dreamweaver but i cant get anything. It just stay on the picture you set for the background.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  8. #7
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    Ok i got it. I had to set the Values for the Options in the drop down menu.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  9. #8
    Junior Member wburrough's Avatar
    Join Date
    Nov 2006
    Posts
    17
    Member #
    14316
    ok i have been playing with it for a little and i have a question. I want to resize the images but i dont want to resize the actuall images. http://www.faceplatesgrillz.com/Options_Test.htm you can see that i have changed the image size in the style but it just changes the image box not the image.
    Good Artist Copy, Great Artist Steal.
    Myspace Page

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    doh!

    You should see what I have now!!!

    http://www.catpin.com/grillz

    I have the original script with a PHP script that uses GD to resize your
    full-size images. With a little magnifying glass to see detail. Pretty Neat!

    You can view and copy all HTML and the magnifier image.

    Here's the PHP script for resizing, that I'm using, called "grillz.php":

    PHP Code:
    <?php
    // The file
    $filename $_REQUEST['photo'];
    $wid=135;
    $hei=135;

    // Content type
    header('Content-type: image/jpeg');
    header('Content-length: '.filesize($filename));

    // Assign new dimensions
    list($width$height) = getimagesize($filename);
    $new_width $wid;
    $new_height $hei;

    // Resample
    $image_p imagecreatetruecolor($new_width$new_height);
    $image imagecreatefromjpeg($filename);
    imagecopyresampled($image_p$image0000$new_width$new_height$width$height);

    // Output
    imagejpeg($image_pnull100);
    ?>



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com