Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > using img.width in asp

Reply
Thread Tools

using img.width in asp

 
 
solomon_13000
Guest
Posts: n/a
 
      06-21-2006
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>

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      06-21-2006
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)
 
Reply With Quote
 
 
 
 
solomon_13000
Guest
Posts: n/a
 
      06-21-2006
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>


 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      06-21-2006
"solomon_13000" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> 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>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send SMS using ASP.NET[1.1], C# using GSM modem connected senthil ASP .Net Mobile 0 10-12-2007 07:17 AM
Drop Downlist using ajax similar to google suggest using ASP ADvantage Javascript 1 05-12-2006 05:29 AM
How to transform xml variable to xsl file using asp.net using vb.net telescient telescient via .NET 247 ASP .Net 1 04-04-2005 02:50 PM
Sharing ASP session variables with ASP.Net using HTTPWebRequest Hardik Shah ASP .Net 3 12-10-2003 02:07 AM
Using Session cookie to access ASP from within ASP.NET Dax Westerman ASP .Net 0 08-18-2003 07:38 PM



Advertisments