Skip navigation
anya10
Currently Being Moderated

Webpage

Jun 24, 2012 9:32 PM

Hi there... I am trying to create a website where you have buttons horizontally that when clicked a large image appears below them in the same browser window. This image will change according to what button is clicked above. I set up my web page in tables, was I to use frames?

 
Replies
  • Currently Being Moderated
    Jun 25, 2012 12:01 AM   in reply to anya10

    I am trying to create a website where you have buttons horizontally that when clicked a large image appears below them in the same browser window. This image will change according to what button is clicked above.
    Depends on what it is that you want to do. Is it a menubar, are the buttons thumbnails, are they normal HTML buttons? If you want assistance then you will need to be more specific.

    I set up my web page in tables, was I to use frames?

    Tables are meant for tabular data, not for layouts. Thankfully frames are a thing of the past. It is best to go for a CSS site. To help you with this, have a look here http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1.htm l

     

    Create a mockup of the page that you want to create and upload it. Then supply a link to the page so that we can see what it is that you want.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 9:52 AM   in reply to anya10

    Tables are not ideal for page layout.  Nevertheless, this kind of effect is known as a disjoint rollover.  You can see a tutorial for that at this location -

     

    http://www.dwfaq.com/tutorials/basics/disjointed.asp

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 1:28 PM   in reply to anya10

    Let's see your code, please. Can you paste the code in a reply?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 1:40 PM   in reply to anya10

    Use CSS Opacity to change thumbnail density on hover.

     

    CSS:

     

    #thumbnail img {opacity: 0.5 }

    #thumbnail img:hover {opacity: 1.0}

     

     

    HTML:

     

    <div id="thumbnail">

         <img src="image1.jpg">

         <img src="image2.jpg">

         <img src="image3.jpg">

         <img src="image4.jpg">

    </div>

     

    Use Show/Hide Layer Behaviors to make full size images appear on click.

    Working demo (view source to see the code).

    http://alt-web.com/DEMOS/Show-Hide-Layers.html

     

     

     

    Nancy O.

    Alt-Web Design & Publishing

    Web | Graphics | Print | Media  Specialists 

    http://alt-web.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 2:00 PM   in reply to anya10

    The button should be this -

     

    <td><a href="javascript:;" onclick="MM_swapImage('seven31','','pathA',1)"><img src="7.jpg" name="seven" width="82" height="94" id="seven" /></a></td>

     

    The image should be this -

     

    <td colspan="11" rowspan="2"><a href="javascript:;"><img src="31.jpg" name="seven31" width="890" height="471" id="seven31"/></a></td>

     

    pathA should be the path from the current page to the IMAGE (in other words it should be the pathname for the NEW image to be swapped in when you click the link - perhaps something like "31-large.jpg").

     

    If you would upload your page and post a link to it, that would help us get you going!

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 5:03 AM   in reply to anya10

    Yeah - that's probably because you didn't put in the correct value for "pathA" in the code.  Let's see what you have now, please.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 8:33 AM   in reply to anya10

    Is 31-large.jpg the name of the image to be swapped in to replace 31.jpg?

    Is that 31-large.jpg image at the same folder level as the page in question (i.e., is that path correct)?

    Have you uploaded 31-large.jpg?

     

    Can you post a link to this uploaded page so we can see what's happening?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 9:14 AM   in reply to anya10

    Change the event from onclick to onmouseover in the behaviours panel OR go into code view and amend it:

     

     

    id="seven" onmouseover=

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 9:54 AM   in reply to anya10

    We'll onmouseover fading then onclicking gets a bit more complex and you'll probably have to look at a jQuery solution. Below is a simple example, just change 'yourImage.jpg' to the name of your image. You can then add an onclick event to the image using the built in Dreamweaver behaviours

     

     

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title>Untitled Document</title>

     

     

    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>

     

    <script type="text/javascript">

      $(document).ready(function(){

        $(".fade").hover(function() {

          $(this).stop().animate({opacity: "0.2"}, 'slow');

        },

        function() {

          $(this).stop().animate({opacity: "1"}, 'slow');

        });

      });

    </script>

    </head>

     

    <body>

    <img src="yourImage.jpg" class="fade" width="200" height="150" />

    </body>

    </html>

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points