zuzupus
07-14-2003, 05:32 AM
hi,
i am using textear in form so that user can enter as much as text but proplem is when he clicks on submit button this text wll submit in same form actually this lookes very weid when text is too long as the text inside
<td nowrap align="center"><?= $line["text"] ?></td>
and when user text something like hahahhahahhahhahahhhahahahahhhhhhhhhhhhhhhhhhh
then the form takes too long as i want user can see upto hahah when use blur on this he can see the whole text i jsut want to avoid long text in single line
the below script is only useful when user type soem text in textarea i want this result when save button cllicks
if anybody solve this problem will really be appreciable
thanks
<html>
<head>
<title>Weird Form Stuff</title>
<script type="text/javascript">
function tarea()
{
if(document.getElementById)
{
if(document.getElementById("tar").rows == 5)
{
document.getElementById("tar").rows = 1
a = document.getElementById("tar").value
a = a.substring(10)
if(a)
{
document.getElementById("tar").title = '...' + a
}
else
{
document.getElementById("tar").title = ''
}
}
else
{
document.getElementById("tar").rows = 5
document.getElementById("tar").title = ''
}
}
}
</script>
</head>
<body>
<textarea name="tar" id="tar" cols="10" rows="1" onfocus="tarea();" onblur="tarea();" title=""></textarea>
</body>
</html>
i am using textear in form so that user can enter as much as text but proplem is when he clicks on submit button this text wll submit in same form actually this lookes very weid when text is too long as the text inside
<td nowrap align="center"><?= $line["text"] ?></td>
and when user text something like hahahhahahhahhahahhhahahahahhhhhhhhhhhhhhhhhhh
then the form takes too long as i want user can see upto hahah when use blur on this he can see the whole text i jsut want to avoid long text in single line
the below script is only useful when user type soem text in textarea i want this result when save button cllicks
if anybody solve this problem will really be appreciable
thanks
<html>
<head>
<title>Weird Form Stuff</title>
<script type="text/javascript">
function tarea()
{
if(document.getElementById)
{
if(document.getElementById("tar").rows == 5)
{
document.getElementById("tar").rows = 1
a = document.getElementById("tar").value
a = a.substring(10)
if(a)
{
document.getElementById("tar").title = '...' + a
}
else
{
document.getElementById("tar").title = ''
}
}
else
{
document.getElementById("tar").rows = 5
document.getElementById("tar").title = ''
}
}
}
</script>
</head>
<body>
<textarea name="tar" id="tar" cols="10" rows="1" onfocus="tarea();" onblur="tarea();" title=""></textarea>
</body>
</html>