Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Am using calendar extendar to select the date. Based on date am showing the records in pdf using iframe. after showing the record if i click the date calendar is going behind the iframe. Only in IE7 and IE8 its not working. below IE7 its working.

Am have tried z index. but no use. Please can anyone solve my prob.

This is my code

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
                <tr>
                    <td align="center" style="width: 100%; position: relative;">
                        <div>
                            <asp:Label ID="Label1" runat="server" CssClass="LabelStyle1" Font-Bold="False" Text="As of date"></asp:Label>
                            &nbsp;&nbsp;
                            <asp:TextBox ID="txtSrtDate" CssClass="TextBoxStyle1" onclick="javascript:return hi();"
                                runat="server" Width="100px"></asp:TextBox>
                            <cc1:CalendarExtender EnableViewState="true" ID="dtDate" TargetControlID="txtSrtDate"
                                Format="dd/MM/yyyy" runat="server">
                            </cc1:CalendarExtender>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnShow" runat="server" CssClass="ButtonLoginPage"
                                Text="Show" ValidationGroup="DateValidation" />
                        </div>
                    </td>
                </tr>
                  <tr>
                    <td align="left">
                        <div id="div2">
                            <iframe runat="server" id="ifShowPdf" visible="false" width="100%" height="650px">
                            </iframe>
                        </div>
                    </td>
                </tr>
            </table>



Thanking You
Posted
Updated 1-Jul-10 0:26am
v5
Comments
koool.kabeer 29-Jul-10 4:42am    
i have tried your code .. its working fine with me.... may be problem with your AjaxControlToolkit... even i put the 'src' of Iframe and i tested it on IE6, Chrome and Firefox..... the problem may be from AjaxControlToolKit

Add this bit of javascript to your page:
JavaScript
function calendarShown(sender, args)
{
    sender._popupBehavior._element.style.zIndex = 10005;
}

And then in the attributes for your calendar extender, add:
OnClientShown="calendarShown"
 
Share this answer
 
Comments
Toniyo Jackson 30-Jun-10 9:42am    
Still its not working. am getting the script error "object expected".
JimBob SquarePants 30-Jun-10 16:51pm    
Reason for my vote of 1
Did you even read the question? The guy clearly states that he's tried z-index.
Have you had any joy?

I'd steer away from the ajax toolkit as much as possible. It's full of bugs and has far too many css properties that are hardcoded into the javascript behind the controls.

I would have a look at JQuery and the JQuery UI for the calender. It's much more flexible to style and you will definitely be able to fix up something cross browser compatible with that.

Check it out here.http://jqueryui.com/[^]

Oh and avoid using inline javascript or css styles. It's just bad practise.
 
Share this answer
 
Comments
Toniyo Jackson 1-Jul-10 1:59am    
I cannot use jquery. Becoz my company will not allow me to do. Already we r working in ajax.
JimBob SquarePants 1-Jul-10 10:04am    
You can't use Jquery? What kind of company do you work for?

In that case you will need to have a look at the source code for the version of the Ajax Toolkit you are using to determine if the z-index of your calender is hard coded or not.

Is it the latest version?

If not, get the latest from codeplex as I think it has had a lot of work done on it to fix bugs.

I notice you haven't assigned a css class to the calender extender. Have you tried defining a class and setting an appropriately high z-index with that? If so I can only suggest you position the calender so that it does not occupy the same space as the iframe.
Download the ajaxcontroltoolkit source code and make a small fix in the popupextender class, then recomile the DLL, add this newly compiled DLL in your project and your problem will be solved.
;)

Refer the solution provided @ http://isolvable.blogspot.com/2009/09/problem-rendering-ajax-popupextender.html#comment-form[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900