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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textarea property not set in browser

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi All,
I have the following definiton for my table:

<table border ="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="25">
<tr>
<td width="40%" align="right" valign="top" height="25">
<font face="Arial"><small><strong>Notes:</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left"><textarea rows="5" cols="30" type="text" id=txtNotes name=txtNotes></textarea></td>
</tr>
</table>

It looks Ok in quick view when I adjust the rows/cols property. However in the browser (IE Latest version) no matter what I change the values to, it always remain a fixed size. Why is this?

Thanks
 
judging by the limited code you've given, it could be a few different things.

it could be that you are taking up the maximum size that 55% gives you on your screen.
it could be that you have css somewhere that is styling the textarea to be a fixed height/width.

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
beware of active imagination: [URL unfurl="true"]http://www.coryarthus.com/[/url]

BillyRayPreachersSonIsTheLeetestHax0rDude
[banghead]
 
Why use rows and cols anyway? Just define the width with css and say 100% of the container or something. Also, I am wondering how the whole table is 25px tall and textarea is 5 rows. 5px per row seems awfully small for a font.
 
cLFlaVA,
Here's the code (form element) for the whole page. I can't seem to find out what's wrong. TIA
Vragabond, thanks for your comments.

<FORM action="" method=POST align=centre id=frmNotes name=frmNotes>

<table border ="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="25">
<!--Get Appropriate Headings -->
<%if Updateaccess = "N" then%>
<tr>
<td width="35%" class=title align="center" valign="top" height="30" colspan=5>
<big><big><font class = titletext>View Notes</big></big></font>
</td>
</tr>
<%elseif Request.QueryString("mode")= "I" then%>
<tr>
<td width="35%" class=title align="center" valign="top" height="30" colspan=5>
<big><big><font class=titletext>Insert Notes</big></big></font>
</td>
</tr>
<%else%>
<tr>
<td width="35%" class=title align="center" valign="top" height="30" colspan=5>
<big><big><font class=titletext>Update Notes</big></big></font>
</td>
</tr>
<%end if%>

<!--End Get Appropriate Headings -->

<tr>
<td width="100%" align="center" valign="top" height="20">
<font face="Arial"><small><strong> Crime Reference Number:<%Response.Write session("incidentCRN")%></strong></small></font>
</td>
</tr>
</table>


<%if Updateaccess = "Y" then

if Request.QueryString("mode")="I" then%>
<!--Display Notes field for input -->
<table border ="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="25">
<tr>
<td width="40%" align="right" valign="top" height="25">
<font face="Arial"><small><strong>Notes:</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left"><textarea rows="5" cols="30" type="text" id=txtNotes name=txtNotes></textarea></td>
</tr>

</table>
<!--End Display Notes field for input -->

<%elseif Request.QueryString("mode")="U" then

set cmd = Server.CreateObject("ADODB.Command")
set condb=Server.CreateObject("ADODB.Connection")
condb.Open Session("ConnectionString")
cmd.ActiveConnection=condb
cmd.CommandType=4
cmd.CommandText="sp_Notes"
cmd.Parameters(1)="S"
cmd.Parameters(2)= session("incidentref")
cmd.Parameters(3)=null
cmd.Parameters(4)=Request.QueryString("noteid")
cmd.Parameters(5)=null
set rs=cmd.Execute
if rs.eof = true then
Session("strMessageHeader")= "Notes not found"
Session("strMessageDetail")= ""
rs.close
condb.Close
set rs=nothing
set cmd= nothing
set condb=nothing
Response.Redirect "../standards/zzmessage01.asp"
end if%>
<!--Display record to be updated -->
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="25">
<tr>
<td width="40%" align="right" valign="top" height="20">
<font face="Arial"><small><strong>Notes:</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20">
<font face="Arial"><small><strong><INPUT id=txtNotes name=txtNotes value="<%=rs.fields("notes")%>"></strong></small></font>
</td>
</tr>

<tr>
<td width="40%" align="right" valign="top" height="20" readonly>
<font face="Arial"><small><strong>Last Updated By</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20" readonly>
<font face="Arial"><small><strong><%ret=GetUser (rs.fields("userid"))%></strong></small></font>

</td>
</tr>

<tr>
<td width="40%" align="right" valign="top" height="20" readonly>
<font face="Arial"><small><strong>Last Updated On</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20" readonly>
<font face="Arial"><small><strong><%=rs.fields("audtime")%></strong></small></font>
</td>
</tr>
<!-- <tr>
<td width="40%" align="right" valign="top" height="20" style="VISIBILITY: hidden">
<font face="Arial"><small><strong>NoteId:</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20" readonly style="VISIBILITY:hidden">
<font face="Arial"><small><strong><INPUT TYPE="text" id=txtNoteID name=txtNoteID value="<%=rs.fields("noteid")%>"></strong></small></font>
</td>
</tr> -->

<!--End Display record to be updated-->
</table>

<%rs.close
condb.Close
set rs = nothing
set cmd=nothing
set condb = nothing

else 'QueryString mode <> "I" or "U"

Session("strMessageHeader")= "Invalid Querystring(mode)"
Response.Redirect "../standards/zzmessage01.asp"
end if
'End If for QueryString(mode)

elseif Updateaccess ="N" THEN
set cmd = Server.CreateObject("ADODB.Command")
set condb=Server.CreateObject("ADODB.Connection")
condb.Open Session("ConnectionString")
cmd.ActiveConnection=condb
cmd.CommandType=4
cmd.CommandText="sp_Notes"
cmd.Parameters(1)="S"
cmd.Parameters(2)= session("incidentref")
cmd.Parameters(3)=null
cmd.Parameters(4)=Request.QueryString("noteid")
cmd.Parameters(5)=null
set rs=cmd.Execute

if rs.eof = true then
Session("strMessageHeader")= "Notes not found"
Session("strMessageDetail")= ""
rs.close
condb.Close
set rs=nothing
set cmd= nothing
set condb=nothing
Response.Redirect "../standards/zzmessage01.asp"
end if%>
<!-- Allow them to VIEW the record -->
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center" height="25">
<tr>
<td width = "40%" align="right" valign="top" height="20">
<font face="Arial"><small><strong>Notes:</strong></small></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20">
<font face="Arial"><small><strong><textarea rows="3" cols="50" id=txtNotes name=txtNotes value="<%=rs.fields("notes")%>" readonly ></textarea></strong></small></font>
</td>
</tr>

<tr>
<td width="40%" align="right" valign="top" height="20">
<font face="Arial"><small><strong>Last Updated By</small></strong></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20" readonly>
<font face="Arial"><small><strong><INPUT id=txtUserID name=txtUserID readonly value="<% ret = GetUser(rs.fields("userid"))%>"></strong></small></font>
</td>
</tr>

<tr>
<td width="40%" align="right" valign="top" height="20">
<font face="Arial"><small><strong>Last Updated On</small></strong></font>
</td>
<td width="5%"></td>
<td width="55%" align="left" valign="top" height="20" readonly>
<font face="Arial"><small><strong><INPUT id=txtaudTime name=txtaudTime readonly value="<%=rs.fields("audtime")%>"></strong></small></font>
</td>
</tr>
</table>
<!--End VIEW record -->
<% rs.close
condb.close
set rs=nothing
set cmd = nothing
set condb=nothing
%>

<%end if%> <!--for updateaccess-->


<%if Request.QueryString("mode")="U" then%>
<INPUT TYPE ="text" id=txtNoteID name=txtNoteID value="<%=Request.QueryString("noteid")%>" style="VISIBILITY: hidden; WIDTH:50px">
<%else%>
<INPUT TYPE="text" id=txtNoteID name=txtNoteID value=null style="VISIBILITY: hidden;WIDTH:50px">
<%end if%>

<% if Updateaccess <> "N" then %>
<p align="center">
<INPUT type="submit" value="Save" id=cmdSave name=cmdSave align="right" class=button>
</p>
<% end if %>
<INPUT TYPE="text" id=txtMode name=txtMode value="<%=Request.QueryString("mode")%>" style="VISIBILITY: hidden">
<INPUT TYPE="text" id=txtUserID name=txtUserID value="<%=Session("strUserId")%>" style="VISIBILITY: hidden">
<INPUT TYPE="text" id=txtIncidentRef name=txtIncidentRef value="<%=Session("incidentref")%>" style="VISIBILITY: hidden">
</FORM>
 
if you don't have any css, then the only reasons may be:

you're setting a static height for the table of 25. try removing that.
you're setting a percentage width for the table cell. if it's already maxed out, it won't grow larger.

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
beware of active imagination: [URL unfurl="true"]http://www.coryarthus.com/[/url]

BillyRayPreachersSonIsTheLeetestHax0rDude
[banghead]
 
Hi cLFlaVA,
I'll give that a go.
I'll let you know how I get on.

Cheers.
 
Hello,
The css looks likes this.

TABLE TR
{
HEIGHT:25px;
BACKGROUND-COLOR:lightskyblue
}


TEXTAREA
{
WIDTH:220px
FONT-FAMILY:Arial
HEIGHT:44px
}

Would I need to change just the TEXTAREA property or the TABLE property as well?
If so, what should the new values be?

Also which has probably been confirmed by the problem I'm having: If I have a CSS file and within my page and in my page I code values which do not match values in the CSS, does the CSS take preference? If so, why code the values in the page(again)?

Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top