How to check whether a textbox is placed inside a panel using javascript?

Fearsinho

New Member
I am having a \[code\]TextBox\[/code\] and an \[code\]ImageButton\[/code\] within an \[code\]ASP:Panel\[/code\]. I have set DefaultButton property to the panel. When I focus on the \[code\]TextBox\[/code\] and press the enter key, the server side click event of \[code\]ImageButton\[/code\] should be fired. For that, I need to check a condition in script (i.e) whether the textbox is placed inside the panel and the panel has \[code\]DefaultButton\[/code\] property, so that I can call the server side event on enter press. So, can anyone please let me know how to check whether the \[code\]TextBox\[/code\] is placed inside a \[code\]Panel\[/code\] using script??Thanks in advance.
 
Back
Top