www.webdeveloper.com
Results 1 to 4 of 4

Thread: how do I get the size of a banner?

  1. #1
    Join Date
    Nov 2003
    Location
    SA
    Posts
    261

    how do I get the size of a banner?

    Hi peoples

    I tried this one, but can't figure it out!

    A user enters a banner url and clicks submit, this then saves into the db to be displayed on some other page later.

    Now I don't know what the sizes for this picture will be, it could be some huge image taking over the entire page (not good), where it is suppose to be no larger than 400x80..

    Any ideas on how to get that banner size using asp vb or js?

    Any help, clue or tip will do!

    Thanks
    The best way to predict the future, is to invent it!

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Are you just wanting to check the url of a banner already on the net? Or is the user uploading? Is so what upload component are you using? Perhaps this will be helpful: http://www.chestysoft.com/imagefile/filedemo.asp

  3. #3
    Join Date
    Nov 2003
    Location
    SA
    Posts
    261
    Nice "pink" theory PeOfEo.. thanks for the reply!

    Nope, just pointing. No uploading!

    When the banner displays it fetches the banner from another site on the net.

    Can it be done?? And how??

    Thanks
    The best way to predict the future, is to invent it!

  4. #4
    Join Date
    Nov 2003
    Location
    SA
    Posts
    261
    Hi

    Don't worry, I found the solution!

    Here it is, I got it in the Javascript section!

    PHP Code:
    <script type="text/javascript">
    <!--
    url 'http://bettiepage.com/images/photos/bikini/bikini1.jpg';

    img = new Image ();
    img.src url;
    document.write('<dl><dt>Image</dt><dd>'img.src'</dd><dt>Height</dt><dd>'img.height'</dd><dt>Width</dt><dd>'img.width'</dd></dl>');
    // -->
    </script> 
    The best way to predict the future, is to invent it!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles