Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

input size
 

NEWS




quote this post edit post

IP Loged report this post

Old Post  12-21-05 - 11:46 PM  
I would like to dynamically change an image boxs size using CSS

<script type="text/javascript">
document.forms[x].elements[y].className="fontSIZED";
document.forms[x]elements[y].size="20";//want to change text box
</script>

The fiirst line works but the second line does not what am I doing wrong??




Post Follow-Up to this message ]
Re: input size
 

Jim Moe




quote this post edit post

IP Loged report this post

Old Post  12-22-05 - 08:31 AM  
NEWS wrote:
>
> <script type="text/javascript">
>    document.forms[x].elements[y].className="fontSIZED";
>    document.forms[x]elements[y].size="20";//want to change text bo
x
> </script>
>
> The fiirst line works but the second line does not what am I doing wrong??
>
Change "forms[x]elements[y]" to "forms[x].elements[y]".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Post Follow-Up to this message ]
Re: input size
 

Johannes Koch




quote this post edit post

IP Loged report this post

Old Post  12-22-05 - 11:49 AM  
> NEWS wrote: 

Jim Moe wrote:
>   Change "forms[x]elements[y]" to "forms[x].elements[y]".

And according to
<[url]http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-6043025[/url
]>:

attribute unsigned long   size;

it must be

forms[x].elements[y].size=20;  // no String (no quotes around the va
lue)
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Post Follow-Up to this message ]
Re: input size
 

Jasen Betts




quote this post edit post

IP Loged report this post

Old Post  12-22-05 - 11:49 AM  
On 2005-12-21, NEWS <antispam@nospam.com> wrote:

><script type="text/javascript">
>    document.forms[x].elements[y].className="fontSIZED";
>    document.forms[x]elements[y].size="20";//want to change text bo
x
></script>
/\
||

shouldn't there be a . betweeen forms[x] and elements[y]

Bye.
Jasen


Post Follow-Up to this message ]
Re: input size
 

NEWS




quote this post edit post

IP Loged report this post

Old Post  12-23-05 - 12:01 AM  
"Johannes Koch" <koch@w3development.de> wrote in message
news:43aa6b16$0$81039$892e7fe2@authen.yellow.readfreenews.net... 
>
> Jim Moe wrote: 
>
> And according to
> <[url]http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-6043025[/u
rl]>:
>
>   attribute unsigned long   size;
>
> it must be
>
> forms[x].elements[y].size=20;  // no String (no quotes around the 
value)
> --

Yet another syntax error, thanks for pointing this out and have a Merry
Christmas




Post Follow-Up to this message ]
Re: input size
 

NEWS




quote this post edit post

IP Loged report this post

Old Post  12-23-05 - 12:01 AM  
"Jasen Betts" <jasen@free.net.nospam.nz> wrote in message
news:6220.43aa665a.46b05@clunker.homenet...
> On 2005-12-21, NEWS <antispam@nospam.com> wrote:
> 
>                     /\
>                     ||
>
>     shouldn't there be a . betweeen forms[x] and elements[y]
>
> Bye.
>   Jasen

You are correct thanks for pointing that out,

Merry Christmas




Post Follow-Up to this message ]
Re: input size
 

Alan J. Flavell




quote this post edit post

IP Loged report this post

Old Post  12-23-05 - 12:01 AM  
On Thu, 22 Dec 2005, NEWS wrote:

> Yet another syntax error, thanks for pointing this out

Please, learn the right lesson from this.  It is demeaning to ask
humans to be a syntax checker.  All of us make typos at one time or
another: learn to syntax-check your code through appropriate software
*before* appealing for help.  Also, if code is to be included in the
posting, be sure to copy/paste (NOT retype) exact code into your
postings - better, though, is to include the URL of your test material
- again, of course, *after* passing it by the relevant validation.

> and have a Merry Christmas

Follow these guidelines, and I'm sure Father X will do the right thing
for you ;-)


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 02:21 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top