473,387 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Modal Popup Extender disappearing during validation

malav123
217 100+
Hi,
I am using ajax toolkit's modal popup extender which contains few text boxes and two buttons on it... i want to put validation on some of text boxes but my problem is after displaying message like "please enter name" when i cliks on ok button the modal popup dissapears... means my next line never executes that is the focus on that particular textbox... so what is the problem ??? i m waiting for response....


thanking u in advance....


-malav.
Jun 3 '08 #1
24 15655
hsriat
1,654 Expert 1GB
Difficult to make a guess without having look at the code, at least for me.

You may provide some code which is creating problem.
Jun 3 '08 #2
malav123
217 100+
Difficult to make a guess without having look at the code, at least for me.

You may provide some code which is creating problem.


Hi,
Which code you want to see...
Jun 3 '08 #3
hsriat
1,654 Expert 1GB
Hi,
Which code you want to see...
You have to figure that out with some debugger.
What does firebug tell about the problem, or some other debugger...?
Jun 3 '08 #4
acoder
16,027 Expert Mod 8TB
malav123, you've posted a few questions here and there's always the same problem about which code to post. What the experts here want to see is client-side code (what you see in the browser), i.e. the generated JavaScript code and relevant HTML markup. If we need to see more code, we'll ask.
Jun 3 '08 #5
malav123
217 100+
You have to figure that out with some debugger.
What does firebug tell about the problem, or some other debugger...?

Hi,
my problem is solved now in which i have asked help from u....
but there is still one problem that for date i have take calendar control... but whenever i clicks on the image i gets the calendar control on back side of modal popup... so what can i do ???
the html code of that table is given below,

Expand|Select|Wrap|Line Numbers
  1. <table border="0" cellpadding="1" cellspacing="3" class="formText" style="margin-left:15px">                           
  2.                             <tr>
  3.                                 <td>
  4.                                     <asp:Label ID="lblReqStartDt" runat="server" Text="*" CssClass="RequiredField" />
  5.                                     <asp:Label ID="lblStart" runat="server" Text ="Start" />
  6.                                 </td>
  7.                                 <td>
  8.                                     <asp:TextBox ID="txtStartDt" runat="server" />
  9.                                     <img id="imgStart" onclick="showCalendarControl(ctl00$ctl1$txtStartDt)" alt="" src="../../images/calendar.gif" />
  10.                                 </td>   
  11.                             </tr>
  12.                             <tr>
  13.                                 <td>
  14.                                     <asp:Label ID="lblReqEndDt" runat="server" Text="*" CssClass="RequiredField" />
  15.                                     <asp:Label ID="lblEnd" runat="server" Text="End" />
  16.                                 </td>
  17.                                 <td>
  18.                                     <asp:TextBox ID="txtEndDt" runat="server" />                                    
  19.                                     <img id="imgEnd" onclick="showCalendarControl(ctl00$ctl1$txtEndDt)" alt="" src="../../images/calendar.gif"  />
  20.                                 </td>
  21.                             </tr>                              
  22.                             <tr>
  23.                                 <td colspan="2">
  24.                                     <asp:Label id="lblnote" runat="server" Text="Note: An E-mail will also be send for notification" ForeColor="red" Font-Bold="true" />                                    
  25.                                 </td>
  26.                             </tr> 
  27.  
  28.                         </table>
  29.  
in above table i am using calendar control for two text boxes i.e. start date and for end date... so please give me solution....
Jun 3 '08 #6
hsriat
1,654 Expert 1GB
Hey malav123,
This is again an ASP code. As the moderator said, you need to show the client side HTML.

When your page opens in the browser, do right click and click on view source. That is the code which we need to see when there's a problem.

Server side script has nothing to do with this.
A good tip for you too, when you have to debug your JavaScript, don't search for the problem in the ASP code. Do view source of the code and see what's wrong with it.

As far as your problem is concerned, you need to give zIndex value to the calender larger then the popup's. Check the function which is called to show the calender onclick of that button.
Jun 3 '08 #7
malav123
217 100+
Hey malav123,
This is again an ASP code. As the moderator said, you need to show the client side HTML.

When your page opens in the browser, do right click and click on view source. That is the code which we need to see when there's a problem.

Server side script has nothing to do with this.
A good tip for you too, when you have to debug your JavaScript, don't search for the problem in the ASP code. Do view source of the code and see what's wrong with it.

As far as your problem is concerned, you need to give zIndex value to the calender larger then the popup's. Check the function which is called to show the calender onclick of that button.



ok thanks here is that html code,

Expand|Select|Wrap|Line Numbers
  1. <table border="0" cellpadding="1" cellspacing="3" class="formText" style="margin-left:15px">                           
  2.                             <tr>
  3.                                 <td>
  4.                                     <span id="ctl00_ctl1_lblReqStartDt" class="RequiredField">*</span>
  5.                                     <span id="ctl00_ctl1_lblStart">Start</span>
  6.                                 </td>
  7.                                 <td>
  8.                                     <input name="ctl00$ctl1$txtStartDt" type="text" id="ctl00_ctl1_txtStartDt" />
  9.                                     <img id="imgStart" onclick="showCalendarControl(ctl00$ctl1$txtStartDt)" alt="" src="../../images/calendar.gif" />
  10.                                 </td>   
  11.                             </tr>
  12.                             <tr>
  13.                                 <td>
  14.                                     <span id="ctl00_ctl1_lblReqEndDt" class="RequiredField">*</span>
  15.                                     <span id="ctl00_ctl1_lblEnd">End</span>
  16.                                 </td>
  17.                                 <td>
  18.                                     <input name="ctl00$ctl1$txtEndDt" type="text" id="ctl00_ctl1_txtEndDt" />                                    
  19.                                     <img id="imgEnd" onclick="showCalendarControl(ctl00$ctl1$txtEndDt)" alt="" src="../../images/calendar.gif"  />
  20.                                 </td>
  21.                             </tr>                              
  22.                             <tr>
  23.                                 <td colspan="2">
  24.                                     <span id="ctl00_ctl1_lblnote" style="color:Red;font-weight:bold;">Note: An E-mail will also be send for notification</span>                                    
  25.                                 </td>
  26.                             </tr> 
  27.  
  28.                         </table>
  29.  
Jun 3 '08 #8
acoder
16,027 Expert Mod 8TB
my problem is solved now in which i have asked help from u....
What was the solution for the first problem? If you post it, it may help someone with a similar problem.
but there is still one problem that for date i have take calendar control... but whenever i clicks on the image i gets the calendar control on back side of modal popup... so what can i do ?
Have you tried setting the z-index as suggested by hsriat? If that doesn't work, post the client-side (not .NET) code for the modal popup and the calendar. You don't need to post all of it (it might be a lot of code) - just the relevant parts.
Jun 4 '08 #9
malav123
217 100+
What was the solution for the first problem? If you post it, it may help someone with a similar problem.
Have you tried setting the z-index as suggested by hsriat? If that doesn't work, post the client-side (not .NET) code for the modal popup and the calendar. You don't need to post all of it (it might be a lot of code) - just the relevant parts.

Hi,
The solution of my previous problem is that now i have take one more button as a common button, before i was having two buttons as a "Okcontrolid" and "Cancelcontrolid", and modal popup was dissappears when i was click on "Okcontrolid" button so i made that button hide and put common button at that place as visible, so when modal popup 's validation gets ok at that time i makes "Okcontrolid" Button as visible so task is over... validations are working now, textboxes gets focus now, data of event also stores now in database..... And sorry that i always gets confused about which code you are asking... but i will not make such mistake in future....
Jun 4 '08 #10
acoder
16,027 Expert Mod 8TB
No problem, thanks for posting. Did you manage to solve the second problem?
Jun 4 '08 #11
malav123
217 100+
No problem, thanks for posting. Did you manage to solve the second problem?
No i still not got solution of my second problem... what shoud i do with the zindex ??? means i have to give zindex size more then modal popup or what ???
Jun 4 '08 #12
acoder
16,027 Expert Mod 8TB
Yes, give it a higher value in the CSS or using JavaScript with the style.zIndex property.
Jun 4 '08 #13
hsriat
1,654 Expert 1GB
No i still not got solution of my second problem... what shoud i do with the zindex ??? means i have to give zindex size more then modal popup or what ???
If there are two or more elements overlapping each other, then the element with higher zIndex is shown above the one having lower zIndex.

What you need to do is:
Find out which function is called to create the calender. The function might be creating the calendar stuff by DOM methods. So just in the end of that function, set the style.zIndex property of the div containing the calender as something say 200. Try that, and see if it works.
If there's some separate CSS for that particular div which contains the calender, then add z-index:200 to that.

Change the value from 200 to higher if it still won't work.
Jun 4 '08 #14
malav123
217 100+
If there are two or more elements overlapping each other, then the element with higher zIndex is shown above the one having lower zIndex.

What you need to do is:
Find out which function is called to create the calender. The function might be creating the calendar stuff by DOM methods. So just in the end of that function, set the style.zIndex property of the div containing the calender as something say 200. Try that, and see if it works.
If there's some separate CSS for that particular div which contains the calender, then add z-index:200 to that.

Change the value from 200 to higher if it still won't work.

Hi,

thanks for the reply, i have tried what you have suggested me but still i am not getting css as working on my calendar controll.... i have tried z-index in css... so what is the problem now ?
Jun 5 '08 #15
hsriat
1,654 Expert 1GB
Hi,

thanks for the reply, i have tried what you have suggested me but still i am not getting css as working on my calendar controll.... i have tried z-index in css... so what is the problem now ?
Show the calender part of the JS and CSS.
Jun 6 '08 #16
malav123
217 100+
Show the calender part of the JS and CSS.
Hi,
I am sending you CSS file that i am using for the Calender controll, js file is very long so if you will need it then i will send u that code also..

Expand|Select|Wrap|Line Numbers
  1. #CalendarControlIFrame {
  2.   display: none;
  3.   left: 0px;
  4.   position: absolute;
  5.   top: 0px;
  6.   height: 250px;
  7.   width: 250px;
  8.   z-index: 5000;
  9. }
  10.  
  11. #CalendarControl {
  12.   position:absolute;
  13.   background-color:#CED5F2;
  14.   margin:0;
  15.   padding:0;
  16.   display:none;
  17.   z-index: 5000;
  18. }
  19.  
  20. #CalendarControl table {
  21.   font-family: arial, verdana, helvetica, sans-serif;
  22.   font-size: 8pt;
  23.   border-left: 1px solid #336;
  24.   border-right: 1px solid #336;
  25. }
  26.  
  27. #CalendarControl th {
  28.   font-weight: normal;
  29. }
  30.  
  31. #CalendarControl th a {
  32.   font-weight: normal;
  33.   text-decoration: none;
  34.   color: #FFF;
  35.   padding: 1px;
  36. }
  37.  
  38. #CalendarControl td {
  39.   text-align: center;
  40. }
  41.  
  42. #CalendarControl .header {
  43.   background-color: #5E636F;
  44. }
  45.  
  46. #CalendarControl .weekday {
  47.   background-color: #FCEDDC;
  48.   color: #000;
  49. }
  50.  
  51. #CalendarControl .weekend {
  52.   background-color: #FFC;
  53.   color: #000;
  54. }
  55.  
  56. #CalendarControl .current {
  57.   border: 1px solid #339;
  58.   background-color: #336;
  59.   color: #FFF;
  60. }
  61.  
  62. #CalendarControl .weekday,
  63. #CalendarControl .weekend,
  64. #CalendarControl .current {
  65.   display: block;
  66.   text-decoration: none;
  67.   border: 1px solid #FFF;
  68.   padding: 1px;
  69.   width: 2em;
  70. }
  71.  
  72. #CalendarControl .weekday:hover,
  73. #CalendarControl .weekend:hover,
  74. #CalendarControl .current:hover {
  75.   color: #FFF;
  76.   background-color: #336;
  77.   border: 1px solid #999;
  78. }
  79.  
  80. #CalendarControl .previous {
  81.   text-align: left;
  82. }
  83.  
  84. #CalendarControl .next {
  85.   text-align: right;
  86. }
  87.  
  88. #CalendarControl .previous,
  89. #CalendarControl .next {
  90.   padding: 1px 3px 1px 3px;
  91.   font-size: 1.4em;
  92. }
  93.  
  94. #CalendarControl .previous a,
  95. #CalendarControl .next a {
  96.   color: #FFF;
  97.   text-decoration: none;
  98.   font-weight: bold;
  99. }
  100.  
  101. #CalendarControl .title {
  102.   text-align: center;
  103.   font-weight: bold;
  104.   color: #FFF;
  105. }
  106.  
  107. #CalendarControl .empty {
  108.   background-color: #CCC;
  109.   border: 1px solid #FFF;
  110. }
  111.  
  112.  
Jun 6 '08 #17
hsriat
1,654 Expert 1GB
Hi,
I am sending you CSS file that i am using for the Calender controll, js file is very long so if you will need it then i will send u that code also..
I couldn't find any error in the CSS part.
Just don't keep same z-index for 2 elements.

Tell me where did you get the calendar code from, I'll see it there.
Jun 6 '08 #18
malav123
217 100+
I couldn't find any error in the CSS part.
Just don't keep same z-index for 2 elements.

Tell me where did you get the calendar code from, I'll see it there.
Hi,
i am not getting what are you saying... and sorry for late reply because we have offday in work on saturday and sunday...
Jun 9 '08 #19
acoder
16,027 Expert Mod 8TB
Are you using .NET controls or a third-party JavaScript calendar script?

I see in your CSS that you have an iframe. Does the modal popup also use an iframe? If you can, post the client-side HTML code and relevant JavaScript here. If not, try to create a small test case which demonstrates the problem and post the code or a link here. Also test in more than one browser to see if the problem is restricted to one browser or not.
Jun 9 '08 #20
malav123
217 100+
Are you using .NET controls or a third-party JavaScript calendar script?

I see in your CSS that you have an iframe. Does the modal popup also use an iframe? If you can, post the client-side HTML code and relevant JavaScript here. If not, try to create a small test case which demonstrates the problem and post the code or a link here. Also test in more than one browser to see if the problem is restricted to one browser or not.
Yes i am using third party calendar controll and it is working fine in all of my pages, i have used it at many places but it only creates problem with modal popup extender only...
Jun 11 '08 #21
acoder
16,027 Expert Mod 8TB
Cut your code down to the bare minimum with only the calendar and modal popup. If you still have the problem, post the client-side code here.
Jun 11 '08 #22
hsriat
1,654 Expert 1GB
or just give a link where you find that third party calender.
Jun 11 '08 #23
or just give a link where you find that third party calender.
Hi, I am new to this forum. I had similar problem.

Just to confirm that hsrisat was right. I located the div element that displays the calendar from my style sheet, then i include z-index to it with a value of 10000. Initial the calendar still appeared behinde the modal popup. So i ncreased the z-index to 500000. immediately, the calendar appeared at the top of the modal popup. That solved my problem.

This is my style sheet amendment

div.calendar { position: relative; z-index:500000;}

Thanks
Jun 26 '08 #24
acoder
16,027 Expert Mod 8TB
Welcome to Bytes and thanks for sharing. It does seem too much of a fix to have such a high number for a z-index. Perhaps you should check the z-index of the modal popup too.
Jun 26 '08 #25

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Samuel Rhodes | last post by:
hi i am using a ajax modal popup to allow the user to search an item and select the required item from the list. whenever i try to search the item, which causes a post back....the modal popup...
1
by: Orit | last post by:
I have a question regarding usage of AJAX Control Toolkit's Popup Control Extender . I am using the Popup Control Extender to display a popup dialog ( panel ) from my asp.net page on click of a...
4
by: Arnab das | last post by:
Below is the javascript code i am using function confirmDelete() { var returnValue = window.confirm("Deleting the current page. Continue?"); return returnValue; // var...
16
malav123
by: malav123 | last post by:
Hi, I am using Ajax's modal popup extender to display the information about all the rows of gridview but the problem is when page loads, modal popup extender loads for all the...
10
malav123
by: malav123 | last post by:
Hi, In my master page i have right pannel, in which i am using the user control and collapsiblePanelExtender and in that right panel there is one link button named "Event", so...
1
malav123
by: malav123 | last post by:
Hi, In my master page i have right pannel, in which i am using the user control and collapsiblePanelExtender and in that right panel there is one link button named "Event", so if user clicks on that...
0
by: PrakashN | last post by:
Hi, Im using modal popup extender control to login.. While validating controls in panel it gets disappear. I tried to show the panel by script "$object('ModalPopupExtenderLogin')._show();", but it...
5
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
Hi all Have a couple of issues with the modal popup extender (asp.net 3.5, vb.net, visual studio 2008): I have created a user control (e-mail enquiry form) which is designed to accept text...
0
by: wojski696969 | last post by:
Hi.. I'm using ASP.NET AJAX Control Toolkit. I've got collapsible extender (CE) putted inside of modal popup extender (MPE), and there is a problem if i scroll the page when collapsible area is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.