Argh...! MyPage.aspx w/ucMyGrid w/ucMyForm

J

JDP@Work

Javascript Error on load caused by a setfocus that exists on the innermost uc.

Is there a best practice to nest on a page a uc w/in a uc and have better
contorl over the events of the innermost uc?

My ucGrid is reused in concert w/the ucMyForm on many pages, when the ucMyForm
is the primary uc, even though its not visible or hidden w/in a panel I don't
get the error, only when it's nested w/in another uc.

Any hints on best practices or perhaps, me. isn't enough or....?

Yes, it's NESTED....

Basic layout as....(see layout below)

On load pnlSearch is visible, if records are found pnlGrid_Outer is visible and
data is displayed in a grid.

Selecting an item hides the grid by me.pnlGrid_Inner.visible = false and the
opposite action on the pnlForm is now visible and the Search panel is also
hidden.

Here's the big Question, I have a Registered script that sets focus to the
District field, this works when the ucMyForm is in the first level, I can detect
IsPostBack and attempt to register the script or not, whith
IsStartupScriptRegistered..

BUT when the ucMyForm is nested w/in the ucMyGrid (great render control layout
etc, as the Grid is the same grid used on many pages in concert with the details
form not just searches but for calendar and other events w/in the
webApplication, anyway.... I digress

I get a JavaScript error when the page first loads saying..

ucMyForm_tbDistNum is not an object or.....

'layout....

....begin pnlSearch

Choose Field: _________V
Enter Criteria: _________]

[ Search ]

.....end pnlSearch

.....begin pnlGrid_Outer

....begin pnGrid_Inner

ucMyGrid

...end pnlGrid_Inner

...begin pnlForm

ucMyForm

...end pnlForm

...end pnlGrid_Inner

....end pnlGrid_Outer

TIA

JeffP....
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top