aspose file tools*
The moose likes JSF and the fly likes Focus after partial submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Focus after partial submit" Watch "Focus after partial submit" New topic
Author

Focus after partial submit

jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
Hi ,

I have a lengthy view page and at the bottom of the page i have a delete button which will delete any of the selected record on the page after deletion i am displaying a message but the focus is not going to the message instead it stays where the delete button is placed. so how to focus the message after deletion happens.

I am doing partial submit when clicking the delete button. I am using trinidad.

thanks
jeff
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

"Focus" is short for "Input focus", and it applies to input controls, not output data.

However, if what you mean is "How do I ensure that the message text is displayed in the visible part of the window?" you should be able to wrap the message in an HTML anchor tag and direct the browser to "go to" the anchor tag.

The HTML anchor is the <a> tag. Although most famous for its "href" attribute, it also allows how to define a link target by name. You indicate the name as part of the URL by preceeding it with a "#". Like: "http://www.javaranch.com".

In the case of a partial page (AJAX) submit, you should be able to find a JavaScript method that will scroll the element into view.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Focus after partial submit