PDA

View Full Version : No focus on page, when page loads



ismailc
02-29-2008, 07:29 AM
Hi, i'm using an xslt file that loads my page - which does not use a body.

The problem i have is that everytime i open the page the focus is on the submit button. I don't really want that - where i just want no focus when the page opens up. I geuss a javascript is needed but i also dont have a body tag!

Any ideas!

Please assist!

Regards

jscheuer1
02-29-2008, 04:13 PM
You could try adding an event attribute to the submit button's tag:


onfocus="this.blur();this.onfocus=null;"

Now, I know that adding attributes to tags in xml and xslt can be a bit different sometimes than in regular HTML, but it can be done, and sometimes it isn't (or doesn't need to be) any different than in HTML.

ismailc
03-03-2008, 08:08 AM
Hi, Thank You very much - great solution!!!

<xsl:attribute name="onfocus">this.blur(); this.onfocus=null;</xsl:attribute>

This work's fantastically well!


Thank You very much!!!