tags:

views:

447

answers:

0

Hey guys,

it seems my problem is hard to solve, I've been googling myself silly...

I have an ASP site (master-content structure) which uses wizard controls to input data. The same functionality should exist in IE and Firefox. Now here's the pickle, I can't seem to catch the enterkey to navigate forward in both browsers. The masterpage has buttons to change the current culture and a print-page button. The content pages use wizard controls to get the needed data from users (subscription details and the likes)

what I would like to do is have Enter trigger the forward movement when I'm on a wizard page. The trouble is

  • the Form.DefaultButton can only be set once (since master doesn't really reaload)
  • the name of the button to trigger the forward movement changes when the steptype changes
  • Firefox seems to ignore most of the settings you do from code behind (for some reason it still fires a defaultbutton on the masterpage while I don't want that)

so the question is, is there a multi-browser way to have Enter (the key) navigate forward only and do nothing else.

what I tried:

  • Setting focus to the next button (only works if you don't click anything else)
  • adding a keypress javascript to click a hidden button that does the same as the next button( this causes firefox to still launch the first control on the screen, which is not the button I want)
  • enveloping the controls within my wizard step in a panel with a new defaultbutton set in PreRender (doesn't work when the panel isn't "focused")

might have forgotten some thing but those are the main ones.

any help is welcome :)