using img.width in asp

S

solomon_13000

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>
 
E

Evertjan.

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.
 
M

McKirahan

solomon_13000 said:
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top