Jack,

I wrote almost the exact thing a week or so ago on this list for a Tiles
issue.  The idea was: He inserted random jsp's into a tile but wanted
(without resubmitting to use the URL#anchor syntax) to make the page
automatically scroll down to a particular inserted area.  Sadly, my post
wasn't as thoughtful: I didn't think to do the try() or the scrollTop=...
trick. Thanks for the new info!

Regards,
David

-----Original Message-----
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 10:13 AM
To: Struts Users Mailing List
Subject: Re: smart navigation


Also, if you want similar things with other browsers, here is a Mozilla
deal:

 <script language="javascript">
function SetScrollTo(strControlID)
{
var objControl=document.getElementById(strControlID);
document.body.scrollTop = objControl.offsetTop;
//maybe object is not focusable, hidden or disabled.
try
{
objControl.focus();
}
catch(e) {}
}

//usage:
SetScrollTo("CONTROL_ID"); //the string is the id of the desired
control in the html document.
</script>

Jack


On Wed, 24 Nov 2004 05:39:09 -0800 (PST), struts lover
<[EMAIL PROTECTED]> wrote:
> Hello Everyone,
> I wanted to know if smart navigation is possible in
> JSP with Struts as it is with ASP.Net.
> If yes, I would like to know it. Any help would be
> appreciated.
> Thanks everyone.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--


"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to