Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Monday, March 26, 2012

Tab Control and URL Frame with IE

I have a custom who is using a URL frame to display a page I created with the Ajax Tabcontainer. The page works fine when accessed directly and works fine in Firefox, however in IE 7 when accessed thru the url frame you can't click on any tab to activate and when you rollover the tab it throughs an exception saying access is denied.

Anyone have any ideas how to work around this, or any fixes?

After many searches I found this: http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx

Which fixes the issue.


After many searches I found this: http://weblogs.asp.net/bleroy/archive/2007/01/31/how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx

Which fixes the issue.

Tab Control Disappears when passing parameter to JavaScript function

Hello everybody!

I have a quite strange error on my hands here. And just to explain, this is what I want to do:

I created a tab control (AJAX) by:

"privatevoid constructTabs()

{

AjaxControlToolkit.TabContainer myTabs=new AjaxControlToolkit.TabContainer();

myTabs.Tabs.Add(loadPanel("NameOfTabGoesHere")); //this is donen times

myTabs.ActiveTab = productTabs.Tabs[0]; //to set the first tab as the active tab

myTabs.OnClientActiveTabChanged = "inVisiblePlans('" +myTabs.ActiveTab.ID.ToString() + "')"; //inVisiblePlans is my javascript function

Panel newPanel =newPanel();

newPanel.Controls.Add(productTabs);

this.Controls.Add(newPanel);

}

"

the function works ok but the problem is, the tab controls cannot be seen? it(the panel) is actually rendered with "hidden" attribute. And the strange thing is, if I domyTabs.OnClientActiveTabChanged = "inVisiblePlans";

The panels are visible but the page is of course useless.

All help will be greatly appreciated! Thanks is advance

Eduardo

Hello again.. about 15 minutes after I posted my question.. I got the answer myself... *slaps himself on the foreheadStick out tongue

instead of usingOnClientActiveTabChanged , I used this:

tabPanel.OnClientClick ="function(){inVisiblePlans('" + tabPanel.ID.ToString() +"');}";

everytime I add a tabPanel.

meaning:

I did not attach the javascript to the whole tabcontrol but attached a call to it in every panel and it works fine now. Am still wondering tho, why the first idea did not work.

Am posting this for all who experience the same problem.

Many thanks!

Saturday, March 24, 2012

Tab Panel Disappears on hover over?

Hi all,

I have a reporting page created in Visual Web Dev 2005. It uses a calendar control to allow a user to select a starting and ending date which fills to separate gridviews that reside in two different tab panels. The datagrids in the panel further break down the data by allowing the user to click on a location (or problem depending on the tab clicked) opening a datagid in the panel and also opening the individual tickets in another datagrid not in the panel.

All works well until I click on the second tab to view the second set of results. It shows the info, but when I move the cursor down into the panel the tab panel disappears! If I click on the tab the info comes back but the same thing happens if I mouse over the second tab.

I'm stumped...

Anybody have any sugesstions?

Wednesday, March 21, 2012

TabContainer Issue

I've created a webform that has a modal dialog box that retrieves data from a database, then returns those values to the parent form. This functionality works fine. I recently added a tabcontainer in hopes to add tabs to the parent web form. After reformatting my form with the tabcontainer and tab panel, everything seem to be working fine until I tested the modal dialog box. It does open but when trying to pass information back to the parent form, it doesn't seem to find the fields. I am using the "document.getElementbyID" with no luck. Below is my javascript function that does work as soon as I remove the tabcontainer with its corresponding tab panel. I put them back and it doesn't work, it does return the followingerror "document.getElementById(...) is Null or not an object"

function openwindow()
{
var txt2 = window.showModalDialog("../Lookups/GroupLK.aspx", "mywindow","status=0,toolbar=0, width=700, height=250, scrollbars=1", txt2);
if (txt2 == null)
{
window.alert("Operation Cancelled");
}
else
{
document.getElementById("txtGroup").value=txt2[1].toString();
document.getElementById("txtGroupID").value=txt2[0].toString();
}
}

Any advice from the experts would be greatly appreciated. I really like to use these tabs on my form.

try using

document.getElementById('<%= txtGroup.ClientID%>').value=txt2[1].toString();
document.getElementById('<%= txtGroupID.ClientID%>').value=txt2[0].toString();


Yes...that did it thank you! But I am still puzzled by the whole "tab container" concept. Why are fields somehow not available. After making the changes as you mentioned above, and proceeding to submit my form the sqldatasource1.insert() is not working. I get the following error "Could not find control 'txtReceived' in ControlParameter 'letter_recv_date' ". Again, if I remove the tab container and leave all the fields onto a form, it works fine. Any additional insights would be appreciated.


Hi Rnino3,

Control's ID usually does same as its ClientID when the control is inside another Container.

For example, TextBox1 inside TabContainer1 , its ClientID should be TabContainer1_TabPanel1_TextBox1. You can find in the generated HTML code. So in your situation, please use <"%=txtReceived.ClientID%"> instead of txtReceived.

Best regards,

Jonathan