RE: JavaScript and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 May 2008 16:12, Boyd, Todd M. advised:

>> -----Original Message-----
> 
> 8< snip!
> 
>> That's incorrect.  A form will function perfectly well with only
name=
>> attributes, and no ids, and it's quite possible for JavaScript to
>> address the form elements using only the names (in fact, it's easier
>> than via the ids as there's a short syntax for it!).
>> 
>> CSS and the DOM, however, use the ids as primary identifier, so use
of
>> either of those may demand the presence of ids.
> 
> 8< snip!
> 
> True, you can access an input named "myInput" in a form named "myForm"
by
> simply writing: 
> 
> 	document.myForm.myInput.value = "Hello!";
> 
> BUT... for CSS, it's also quite easy to reference something by name:
> 
> 	[name="myElement"]
> 	{
> 		color: blue;
> 		font-size: 10pt;
> 	}

Well, true -- hence the qualifiers in "*primary* identifier" and "*may*
demand"!

Cheers!

Mike

 --
Mike Ford,  Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 812 4730


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux