On 13 Feb 2004 06:23:37 -0800, EviL KerneL <fsck66@yahoo.com> wrote:
[snip]
[color=blue]
> I have tried adding a semicolon to divide them both but that does not
> seem to work. Here is what I did:
>
> <input class="submit-button" type="submit" name="next" value="Next"
>
> onclick="document.PdcSurvey.PdcButtonPressed.value ='next';" /;
> 'PdcSurvey.next.value="Please Wait...";return true'>[/color]
1) The whole event string needs to be in a single set of double quotes.
You have split them.
2) The string must be on one line, just like any other HTML attribute
value. New lines can only appear between attribute/value pairs.
[color=blue]
> I have tried several ways to do this but I cannot seem to get them to
> work together. Can anyone shed some light?[/color]
<input class="submit-button" type="submit" name="next" value="Next"
onclick="this.form.PdcButtonPressed.value='next';
this.value='Please wait...';">
The last line should not be wrapped, but line length limits forced me to
do it.
You should notice that I shortened the string slightly using the "this"
operator. In an intrinsic event, "this" refers to the current element; in
this case, the submit button "next". This allows you to change the value
of the button simply using "this.value='...'". Furthermore, all form
controls have the property, "form", which refers to the containing form
element. Instead of "document.PdcSurvey", you can use "this.form".
Finally, I removed the return statement: unless you are returning false,
it is not required.
Hope that helps,
Mike
--
Michael Winter
M.Winter@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)