Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Height and width of an html control

Status
Not open for further replies.

vishalmarya

Programmer
Aug 19, 2001
28

how can i set Height and width of an html control from javascript ?

say i have a button h_btn1

<script language="javascript">
document.Form1.h_btn1.Width="300px";
alert(document.Form1.h_btn1.Width);
</script>

alert box is shown with width as 300 , but visually it does not change.


 
vishalmarya, you may think you are already doing what BillyRay is showing, but you're not quite. Javascript is case sensitive, so make sure your "[!]W[/!]idth" is "[!]w[/!]idth"

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top