Web Analytics Made Easy -
StatCounter Adjusting frameset rows - CodingForum

Announcement

Collapse
No announcement yet.

Adjusting frameset rows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adjusting frameset rows

    I need to automatically adjust the frameset rows based on the height of a GIF that I will display in that frame. When the page is built I don't know which GIF will be displayed.

    How can I get the height of a GIF on my web page?

    And adjust the frameset rows value?

  • #2
    And the reason the gif is framed is..?..?..?
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

    Comment


    • #3
      The reason it is displayed? I'm not sure what you're asking. I will put a GIF on the top frame based on who is going to my site.
      I want my top frame to adust to the height of the GIF so I don't have to hard code my rows. I want to allow the most area to appear in the bottom frame.

      Thanks

      Comment


      • #4
        Why are using frame to display the image???
        Vladdy | KL
        "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

        Comment


        • #5
          Well I guess it is just personal preference. I have a header frame and I am display a GIF along with other personal information about the person displaying the page. This allows me to pump out pages to the bottom frame with little or no overhead for the info on the top.

          Comment


          • #6
            If you have repeated code on your pages, use Server Side Includes. Frames cause too many problems while solving next to none (or in other words, whatever problem you are trying to solve using Frames can be better solved by other means)
            Vladdy | KL
            "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

            Comment


            • #7
              All that aside. Can anyone please help or point me in the right direction on these questions?

              How can I get the height of a GIF on my web page?

              And adjust the frameset rows value?


              Thanks

              Comment


              • #8
                Sorry, but I did point you in the RIGHT direction. What you are trying to do is akin banging your head on the wall for no apparent reason and then looking to take aspirins so it does not hurt.
                Vladdy | KL
                "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

                Comment


                • #9
                  I am one of those people who do not think that frames should never be used. There are also situations at work where I have to work in framed environments whether I want to or not.

                  All of that however has nothing to do with the main purpose of this post. To answer the question here is one way in which you can get information about an image's attributes:

                  Code:
                  <script type="text/javascript">
                  <!--//
                  function get_img_att(img){
                  	var temp_img = new Image();
                  	temp_img.src = img;
                  	var w = temp_img.width;
                  	var h = temp_img.height;
                  	alert("The image height is :"+h+" pixels.");
                  }
                  //-->
                  </script>
                  <img src="your_image.gif" onload="get_img_att(this.src)">

                  Comment

                  Working...
                  X