471,887 Members | 1,626 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 1195
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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.