PDA

View Full Version : Detecting the class in a span



Celelond
03-21-2011, 01:40 AM
Hi,

I was wondering if someone could help, I am hitting a blank here for some reason and yet it seems like it should be a simple task.

I have a page, when a tab is selected, it shows this:
<span id="ctl00_MainContentPlaceHolder_TabSearchContainer_TabResultPanel_tab" class="ajax__tab_active">

When that same tab is not selected, it shows:
<span id="ctl00_MainContentPlaceHolder_TabSearchContainer_TabResultPanel_tab" class="">

I am working on a code and that code will need to know if the tab is selected or not but I am hitting a wall.

Any help would be apprecaited.

Bob Phillips
03-21-2011, 01:56 AM
What are we talking about here, a page/tab in what?

Celelond
03-21-2011, 02:03 AM
It is a web page that I log into, once there I enter an account number to pull up archived accounts.

There are two tabs on the page, a search and a results.
If a result is found for the search, the result tab is automatically made active with the results posted below.

I bascially need to be able to detect if that tab becomes active after the search.

Does that help?
I would link the site but it is an internal one, I could try link more of the code if that would help.

Celelond
03-21-2011, 07:36 AM
Okay, been looking it over, another idea would be if I could pick up if the script for the below runs.
If I have it right, this part pops up a form letting the user know no records have been found, and "shadows" the background.

If you could help me with a way to detect if the script was initiated that would help allot.




<script type="text/javascript">
<!--
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ModalPopupBehavior, {"BackgroundCssClass":"modalBackground","DropShadow":true,"PopupControlID":"ctl00_MainContentPlaceHolder_PanelModalMessage","PopupDragHandleControlID":"ctl00_MainContentPlaceHolder_PanelModalMessageTitle","dynamicServicePath":"/o2sa/aspx/DocumentSearch.aspx","id":"ctl00_MainContentPlaceHolder_ModalPopUpMessage"}, null, null, $get("ctl00_MainContentPlaceHolder_hiddenTargetControlForModalPopup"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ModalPopupBehavior, {"BackgroundCssClass":"modalBackground","DropShadow":true,"PopupControlID":"ctl00_MainContentPlaceHolder_PanelModalPreferences","PopupDragHandleControlID":"ctl00_MainContentPlaceHolder_PanelModalPreferencesTitle","dynamicServicePath":"/o2sa/aspx/DocumentSearch.aspx","id":"ctl00_MainContentPlaceHolder_ModalPopupPreferences"}, null, null, $get("ctl00_MainContentPlaceHolder_hiddenTargetControlForModalPopup2"));
});

There is more to the script, but this was the only part that looked relevant, if you need more, just say.

I am way out of my depth, so if I missed somethig out you need, just say.

Thanks