Image dialog: max image size properties

Last post 05-29-2006, 11:47 AM by dabbi2000. 2 replies.
Sort Posts: Previous Next
  •  05-29-2006, 6:13 AM 19588

    Image dialog: max image size properties

    I really need to set a maximum value to the height & width parameters of images users are editing since they are creating havoc in my html layout by displaying images far too big.
     
    I don't want to restrict images uploaded only the properties *after* they have been uploaded! (fyi I use my custom upload script)
  •  05-29-2006, 11:18 AM 19594 in reply to 19588

    Re: Image dialog: max image size properties

    dabbi2000,
     
    It's possible.
     
    Try the following solution, you can modify it to meet your own requirements.
     
    Open InsertImage.Frame.aspx and find the following code:
     
                <tr>
                   <td width="100" nowrap>[[Width]]:</td>
                   <td>
                    <INPUT TYPE="text" SIZE="2" id="inp_width" onkeyup="checkConstrains('width');" ONKEYPRESS="event.returnValue=IsDigit();" style="WIDTH : 80px">
                   </td>
                   <td rowspan="2" align="right" valign="middle"><img src="../images/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td>
                  </tr>
                  <tr>
                   <td nowrap>[[Height]]:</td>
                   <td>
                    <INPUT TYPE="text" SIZE="2" id="inp_height" onkeyup="checkConstrains('height');" ONKEYPRESS="event.returnValue=IsDigit();" style="WIDTH : 80px">
                   </td>
                  </tr>
     
     
    Change it to:
     
                <tr>
                   <td width="100" nowrap>[[Width]]:</td>
                   <td>
                    <INPUT TYPE="text" SIZE="2" id="inp_width" onkeyup="if(parseInt(this.value)>500) this.value='200';checkConstrains('width');" ONKEYPRESS="event.returnValue=IsDigit();" style="WIDTH : 80px">
                   </td>
                   <td rowspan="2" align="right" valign="middle"><img src="../images/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" /></td>
                  </tr>
                  <tr>
                   <td nowrap>[[Height]]:</td>
                   <td>
                    <INPUT TYPE="text" SIZE="2" id="inp_height" onkeyup="if(parseInt(this.value)>500) this.value='200';checkConstrains('height');" ONKEYPRESS="event.returnValue=IsDigit();" style="WIDTH : 80px">
                   </td>
                  </tr>
     
    Hope it helps.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-29-2006, 11:47 AM 19595 in reply to 19594

    Re: Image dialog: max image size properties

    thx, exactly what was needed!
View as RSS news feed in XML