using img.width in asp

Discussion in 'ASP General' started by solomon_13000, Jun 21, 2006.

  1. I did a combination of asp and jscript. Parsing a value from asp to
    jscript is working fine. However I intend to use the width value on
    asp. How is it done?

    <script language="JavaScript">

    function testing(pix)
    {
    img = new Image()
    img.src = pix
    alert(img.width)
    }

    </script>

    <%
    Dim m
    m = "http://www..com/db/Upload/photos/nature/06331_30.jpg"
    %>

    <html>
    <head>
    <title>Hello World</title>
    </head>
    <body onLoad="testing('<%=m%>')">
    <%
    response.write "I intend to use the width value over here"
    %>
    </body>
    </html>
     
    solomon_13000, Jun 21, 2006
    #1
    1. Advertising

  2. solomon_13000

    Evertjan. Guest

    solomon_13000 wrote on 21 jun 2006 in
    microsoft.public.inetserver.asp.general:

    > I did a combination of asp and jscript. Parsing a value from asp to
    > jscript is working fine. However I intend to use the width value on
    > asp. How is it done?
    >
    > <script language="JavaScript">
    >
    > function testing(pix)
    > {
    > img = new Image()
    > img.src = pix
    > alert(img.width)
    >}
    >
    > </script>
    >
    > <%
    > Dim m
    > m = "http://www..com/db/Upload/photos/nature/06331_30.jpg"
    > %>
    >
    > <html>
    > <head>
    > <title>Hello World</title>
    > </head>
    > <body onLoad="testing('<%=m%>')">
    > <%
    > response.write "I intend to use the width value over here"
    > %>
    > </body>
    > </html>


    There is nothing wrong with the totally unnecessary ASP.

    > .. to use the width value on asp.


    Please explain what this part of your sentence means.

    ==============

    Overall there is no serverside ASP involved in your quest, I presume.
    If so, please ask a clientsided NG.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 21, 2006
    #2
    1. Advertising

  3. The img.width value in asp.


    solomon_13000 wrote:
    > I did a combination of asp and jscript. Parsing a value from asp to
    > jscript is working fine. However I intend to use the width value on
    > asp. How is it done?
    >
    > <script language="JavaScript">
    >
    > function testing(pix)
    > {
    > img = new Image()
    > img.src = pix
    > alert(img.width)
    > }
    >
    > </script>
    >
    > <%
    > Dim m
    > m = "http://www..com/db/Upload/photos/nature/06331_30.jpg"
    > %>
    >
    > <html>
    > <head>
    > <title>Hello World</title>
    > </head>
    > <body onLoad="testing('<%=m%>')">
    > <%
    > response.write "I intend to use the width value over here"
    > %>
    > </body>
    > </html>
     
    solomon_13000, Jun 21, 2006
    #3
  4. solomon_13000

    McKirahan Guest

    "solomon_13000" <> wrote in message
    news:...
    > The img.width value in asp.


    Are you responding to yourself?

    Anyway, ASP code executes before client-side code
    so what you have won't work. However, this may help:

    <html>
    <head>
    <title>Hello World</title>
    <script type="text/javascript">
    function testing(pix) {
    var img = new Image();
    img.src = pix;
    alert(img.width);
    }
    </script>
    </head>
    <body
    onLoad="testing('http://www..com/db/Upload/photos/nature/06331_30.jpg')">
    </body>
    </html>

    > solomon_13000 wrote:
    > > I did a combination of asp and jscript. Parsing a value from asp to
    > > jscript is working fine. However I intend to use the width value on
    > > asp. How is it done?
    > >
    > > <script language="JavaScript">
    > >
    > > function testing(pix)
    > > {
    > > img = new Image()
    > > img.src = pix
    > > alert(img.width)
    > > }
    > >
    > > </script>
    > >
    > > <%
    > > Dim m
    > > m = "http://www..com/db/Upload/photos/nature/06331_30.jpg"
    > > %>
    > >
    > > <html>
    > > <head>
    > > <title>Hello World</title>
    > > </head>
    > > <body onLoad="testing('<%=m%>')">
    > > <%
    > > response.write "I intend to use the width value over here"
    > > %>
    > > </body>
    > > </html>

    >
     
    McKirahan, Jun 21, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.austin.rr.com

    how to download img from html img tag

    news.austin.rr.com, Apr 27, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    517
    Steve C. Orr [MVP, MCSD]
    Apr 27, 2005
  2. AndrewF
    Replies:
    1
    Views:
    790
    Bruce Barker
    Oct 10, 2005
  3. Philipp Lenssen

    Problem: <img></img>

    Philipp Lenssen, Jun 27, 2005, in forum: XML
    Replies:
    15
    Views:
    773
    David Håsäther
    Jul 3, 2005
  4. Jopek
    Replies:
    7
    Views:
    407
    dorayme
    Apr 26, 2009
  5. Replies:
    7
    Views:
    185
    Tad McClellan
    Jun 22, 2006
Loading...

Share This Page