473,671 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML or Javascript or PHP solution: Textarea with Dynamic Width

The customer made a wild request: they want on their admin panel a
textarea that will display an existing resume.

This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!

Expand|Select|Wrap|Line Numbers
  1. <textarea name="resume" cols="108" rows="29" wrap="physical><?=
  2. $resume ?></textarea>
  3.  
How on earth do I do this? cols="???"

Is there either a client-side solution in HTML or Javascript, or will
I have to use a server-side solution in PHP? I'm completely stuck and
under a Monday AM deadline to come up with a solution.

Thanx
Phil
Jul 23 '05 #1
16 1543
so*****@erols.c om (Phil Powell) writes:
This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!


textarea
{
width: 100%;
}
Follow-up set. See also:

<http://www.cs.tut.fi/~jkorpela/usenet/laws.html#law7>
--
| ) 111010111011 | http://bednarz.nl/
-(
| ) Distribute me: http://binaries.bednarz.nl/mp3/aicha
Jul 23 '05 #2
Phil Powell wrote:
The customer made a wild request: they want on their admin panel a
textarea that will display an existing resume.

This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!

Expand|Select|Wrap|Line Numbers
  1.  <textarea name="resume" cols="108" rows="29" wrap="physical><?=
  2.  $resume ?></textarea>
  3.  

How on earth do I do this? cols="???"

Is there either a client-side solution in HTML or Javascript, or will
I have to use a server-side solution in PHP? I'm completely stuck and
under a Monday AM deadline to come up with a solution.

Thanx
Phil


instead of using: cols="???"
try using: style="width:10 0%;"
Jul 23 '05 #3
for sure, agree with "style='width:1 00%'"

--
www.vicdir.com
"neur0mania k" <us****@neur0ma niak.co.uk> ????
news:40******** *************** @ptn-nntp-reader02.plus.n et...
Phil Powell wrote:
The customer made a wild request: they want on their admin panel a
textarea that will display an existing resume.

This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!

Expand|Select|Wrap|Line Numbers
  1.  > <textarea name="resume" cols="108" rows="29" wrap="physical><?=
  2.  > $resume ?></textarea>
  3.  > 

How on earth do I do this? cols="???"

Is there either a client-side solution in HTML or Javascript, or will
I have to use a server-side solution in PHP? I'm completely stuck and
under a Monday AM deadline to come up with a solution.

Thanx
Phil


instead of using: cols="???"
try using: style="width:10 0%;"

Jul 23 '05 #4
"neur0mania k" <us****@neur0ma niak.co.uk> wrote in message
news:40******** *************** @ptn-nntp-reader02.plus.n et...
Phil Powell wrote:
This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!


instead of using: cols="???"
try using: style="width:10 0%;"


Actually, cols is a required attribute of a textarea. You must provide a
value, but using 'style="width: 100%;"' will override the cols setting for
the width of the textarea.

Chris Finke
Jul 23 '05 #5
Eric B. Bednarz <be*****@fahr-zur-hoelle.org> wrote in message news:<m3******* *****@email.bed narz.nl>...
so*****@erols.c om (Phil Powell) writes:
This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!


textarea
{
width: 100%;
}
Follow-up set. See also:

<http://www.cs.tut.fi/~jkorpela/usenet/laws.html#law7>

Completely failed in Mozilla Firefox 0.6, produces a textarea with "no
width" whatsoever (it looks like a super-skinny textarea).

Phil
Jul 23 '05 #6
neur0maniak <us****@neur0ma niak.co.uk> wrote in message news:<40******* *************** *@ptn-nntp-reader02.plus.n et>...
Phil Powell wrote:
The customer made a wild request: they want on their admin panel a
textarea that will display an existing resume.

This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!

Expand|Select|Wrap|Line Numbers
  1.  > <textarea name="resume" cols="108" rows="29" wrap="physical><?=
  2.  > $resume ?></textarea>
  3.  > 

How on earth do I do this? cols="???"

Is there either a client-side solution in HTML or Javascript, or will
I have to use a server-side solution in PHP? I'm completely stuck and
under a Monday AM deadline to come up with a solution.

Thanx
Phil


instead of using: cols="???"
try using: style="width:10 0%;"

Sorry that totally failed in Mozilla Firefox 0.6, only showing a
"super skinny no-width textarea".

Phil
Jul 23 '05 #7
"Christophe r Finke" <ch***@efinke.c om> wrote in message news:<2l******* *****@uni-berlin.de>...
"neur0mania k" <us****@neur0ma niak.co.uk> wrote in message
news:40******** *************** @ptn-nntp-reader02.plus.n et...
Phil Powell wrote:
This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!


instead of using: cols="???"
try using: style="width:10 0%;"


Actually, cols is a required attribute of a textarea. You must provide a
value, but using 'style="width: 100%;"' will override the cols setting for
the width of the textarea.

Chris Finke


Following was what I attempted, with horrific failure:

[SCRIPT]
<script type="text/javascript">
<!--

function getWinWidth() {
var isNav = (document.all) ? false : true;
var isIE = (document.all) ? true : false;
if (isNav && !isIE)
return(window.i nnerWidth);
else if (isIE && !isNav)
return(document .body.clientWid th);
else
return(null);
}

var width = getWinWidth() / 4;
document.writel n('<textarea rows="29" name="resume" cols="' +
width + '">');
//-->
</script>
<noscript>
<textarea rows="29" name="resume" cols="120" style="{width:
100%}">
blah blah blah this is my resume
</textarea>
</noscript>

[/SCRIPT]

What results is that you will see a textarea with someone's resume and
you will also physically see the <noscript> and <textarea> tags INSIDE
the textarea!

Phil
Jul 23 '05 #8
(followups trimmed to ciwah only)

so*****@erols.c om (Phil Powell) writes:
The customer made a wild request: they want on their admin panel a
textarea that will display an existing resume.
Does it actually have to be a textarea? If the content doesn't need to
be edited then resubmitted you could fake it with <pre> and some
stylesheets. Otherwise, though:
This textarea, however, must have a dynamic width, one that "fills the
screen width of any sized screen". Sorry but I cannot fathom how to
do this!
Not reliably possible. Probably not desirable in all circumstances
either. Consider when the browser window is narrower than the screen
width. Even assuming they meant canvas width, on a really wide screen
this is going to look silly and possibly do strange things with line
wrapping.
<textarea name="resume" cols="108" rows="29" wrap="physical> <?= ^
missing closing quote?
Is there either a client-side solution in HTML or Javascript, or
will I have to use a server-side solution in PHP? I'm completely
stuck and under a Monday AM deadline to come up with a solution.


Tell them it's not possible [1,2] and just put in a large (cols="80"?)
textarea.

[1] Silly Alternative 1: If you're given enough time (years) and
funding (thousands, millions, etc) you could get the next versions of
every browser to support the CSS trick you were shown, I suppose.

[2] Silly Alternative 2: Say that w3m is your only supported
browser. It opens an external editing program for textareas, which
gets around this problem.

--
Chris
Jul 23 '05 #9
Phil Powell wrote:
Following was what I attempted, with horrific failure:

[SCRIPT]
<script type="text/javascript">
<!--

function getWinWidth() {
var isNav = (document.all) ? false : true;
var isIE = (document.all) ? true : false;
if (isNav && !isIE)
return(window.i nnerWidth);
else if (isIE && !isNav)
return(document .body.clientWid th);


[snip]

This looks all too complicated. What are you trying to do with it? Why
are you querying the window width?

I didn't try to figure it all out. But did you try the css solution
without the js? I've sucessfully adjusted the width of a <textarea>
using css.

This has nothing to do with HTML that I can see, and nothing to do
with PHP. You've cross-posted to so many groups, I don't know which
one you normally read. Please trim x-posting, and set followups. There
is no need to add noise to groups where this post is off-topic.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2555
by: Phil Powell | last post by:
The customer made a wild request: they want on their admin panel a textarea that will display an existing resume. This textarea, however, must have a dynamic width, one that "fills the screen width of any sized screen". Sorry but I cannot fathom how to do this! <textarea name="resume" cols="108" rows="29" wrap="physical><?= $resume ?></textarea>
4
2163
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to become visible....If they keep the dropdown box at "No" (default) then I want to submit the form "as is", keeping the inapplicable HTML fields hidden....I'm trying an "if statement" in ASP....Here's my code....I'm thinking that the if statement...
19
6873
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the JavaScript in this code from a couple different sites but I'm not 100% sure what each line is doing...This is the ASP code that I'm using for the page....Take a look at the JavaScript code and please let me know what each line is doing....I have been...
1
16960
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
0
8474
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8392
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8912
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8669
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.