469,303 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,303 developers. It's quick & easy.

convert this from javascript to asp

How can i obtain the same results if I do this in AsP
<select onchange="if (this.selectedIndex > 0) {
if (document.all)
document.all.aP.style.fontFamily = this.value,
document.all.aP.style.fontSize='10mm',
document.all.aP.style.color='red';
else if (document.getElementById)
document.getElementById('aP').style.fontFamily =
this.value;
}"

<option>Select a font</option>
<option value="Arial">Arial</option>
<option value="Helvetica">Helvetica</option>
<option value="Verdana">Verdana</option>
</select>
<p id="aP">
Hello world.
</p>
Jul 19 '05 #1
1 1170
You would have to submit the form. ASP can't interact with client-side
elements after the page has finished loading.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Vincent Jones" <vn****@hotmail.com> wrote in message
news:ba**************************@posting.google.c om...
How can i obtain the same results if I do this in AsP
<select onchange="if (this.selectedIndex > 0) {
if (document.all)
document.all.aP.style.fontFamily = this.value,
document.all.aP.style.fontSize='10mm',
document.all.aP.style.color='red';
else if (document.getElementById)
document.getElementById('aP').style.fontFamily =
this.value;
}"
>

<option>Select a font</option>
<option value="Arial">Arial</option>
<option value="Helvetica">Helvetica</option>
<option value="Verdana">Verdana</option>
</select>
<p id="aP">
Hello world.
</p>

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Michael Stevens | last post: by
4 posts views Thread by Richard Hollenbeck | last post: by
5 posts views Thread by Carl Gilbert | last post: by
9 posts views Thread by mprocopio | last post: by
3 posts views Thread by rishabhshrivastava | last post: by
9 posts views Thread by _Who | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.