2 Replies - 1817 Views - Last Post: 01 October 2012 - 12:30 AM

#1 ersaan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 31-May 12

button resize

Posted 28 September 2012 - 06:51 AM

I create dynamic buton creation but i don't know how to resize my button , is anyone of u could tell me how to resize .... these buttons .

This is all code
<HTML>
<HEAD>
<TITLE>buttons</TITLE>
<script>
function ButtonPress(buttonnumber) {
document.write('You pressed button number : '+buttonnumber);
}
</SCRIPT>

<script>
for (index=1;index<=200;index++)

document.write('<BUTTON onclick="ButtonPress('+index+');">Button '+index+'</BUTTON>');

function ButtonPress(buttonnumber) {
parent.information.document.write('<LI>You pressed button number : '+buttonnumber+'</LI>');
}
</SCRIPT>
</HEAD>
</HTML>


... i purschade u'r help

Is This A Good Question/Topic? 0
  • +

Replies To: button resize

#2 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 125
  • View blog
  • Posts: 818
  • Joined: 25-October 08

Re: button resize

Posted 29 September 2012 - 08:00 PM

Use CSS to control button size...


<HTML>
<HEAD>
<TITLE>buttons</TITLE>
<style type="text/css">
.btn { height:75px; width:125px; }
</style>
<script>
function ButtonPress(buttonnumber) {
  alert('You pressed button number : '+buttonnumber);
}
for (index=1;index<=200;index++)
  document.write('<BUTTON class="btn" onclick="ButtonPress('+index+');">Button '+index+'</BUTTON>');  

</SCRIPT>
</HEAD>
</HTML>


Font size of button can be changed as well.

This post has been edited by JMRKER: 30 September 2012 - 05:31 AM

Was This Post Helpful? 1
  • +
  • -

#3 ersaan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 31-May 12

Re: button resize

Posted 01 October 2012 - 12:30 AM

thnx a lot , now could anyone of u tell me how to make a function to button : to give every button different value ... what i'm thinking is i have a database with a table that contains 15 rows and for each row i wanna make button funciton so when i click first 1 button go execute the row 1 entertaiment. i have a store procedure for that but i don't know how to give function for each buttton .... maybe u understand .. : )
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1