Click to See Complete Forum and Search --> : 'unfoldable' text area


mduran
04-29-2003, 06:22 AM
Hi,

I have a pop-up window with a form in it. This form contains a number of fields and buttons. I would like to setup a button in such way that when you press it, a text area is unfolded as a kind of 'extension' of the form (so resizing the pop-up window). How can I do this without resetting the form when using this button ?

thanks,
m.

pyro
04-29-2003, 07:31 AM
Try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="javascript">
function resize() {
document.getElementById("mytextarea").style.display = "block";
window.resizeTo(300,500);
}
</script>

</head>

<body>

<input name="mytext" type="text"><input name="mybutton" type="button" value="show" onclick="resize();">
<textarea id="mytextarea" name="mytextarea" cols="20" rows="15" style="display:none;"></textarea>

</body>
</html>

mduran
04-29-2003, 08:20 AM
This is ekzzzzactly what I was looking for. Thx pyro !

pyro
04-29-2003, 08:21 AM
You're welcome!