D
Derek Fountain
Given a form, defined like this:
<form action="today.php" method="post" id="continue-form">
i.e without a 'name', can I change the value of an element in it from
script?
If I give it a name ('Form1') this works nicely:
document.Form1.element.value = 1;
but without the 'name' I can't find a way to do it.
The HTML is being generated by a content management system and it's less
than trivial to update so it names the form. If that's the only way
forward I can do it, but I thought I'd check first to see if there's
another way, perhaps by using that 'id' attribute...?
<form action="today.php" method="post" id="continue-form">
i.e without a 'name', can I change the value of an element in it from
script?
If I give it a name ('Form1') this works nicely:
document.Form1.element.value = 1;
but without the 'name' I can't find a way to do it.
The HTML is being generated by a content management system and it's less
than trivial to update so it names the form. If that's the only way
forward I can do it, but I thought I'd check first to see if there's
another way, perhaps by using that 'id' attribute...?