onLoad in XSL

D

Damjan

Hi All,

I have a simple problem.

I have XSL page that translates XML into HTML. It has a form on it.
I want it to be loaded, focused on an intput text field and
then when user presses enter to submit the form. This is possible and
achiavable when using HTML. You put the
onload="document.form.field.focus();" into <body> tag.

The desired field is focused, and upon hiting enter form is submited.
Now, I can still put the onLoad into body, and it works but I have two
problems:
1. When enter is hit form is not submited, instead it seems that the
page is re-called.
2. depending on the resulting XML I might or might not need the form.
if error occured, there is no form just an error message, so the
onLoad raises the error. I've tried to use <xsl:if and when but it did
not work.

Any Help would really help!

Thanks a lot,
Damjan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top