Getting Mixed Results With Page Validation And Modal Popup Usage On A Page?

Mar 9, 2010

I have a page that works great until now that they wanted to add a ModalPopup based on a field value. Before the addition of this modal popup, i had a button event that would do the inserting of the data, it caused the page to validate and as long as the page passed then it would insert and move on to the next page. Now i have a ModalPopup displaying IF a certain field is empty. If they answer Yes to the modalpopup question, it takes them back to the page and sets the focus on that field. Works fine, but if they select No then i need the page to validate and insert the record and move on.I have a customvalidator for the field i need to check. I then have my insert on the main button that causes the validation. The "Yes" and "No" buttons within the modalpopup have the following setup.
[Code]....

My Main submit button has the following:
[Code]....

If i select NO it just goes back to the page and doesnt move forward. If i select YES and enter something the page pops up the modal again and again because i've clicked in the field and keeps asking even though there is now a value in the field. But since there is a value, i can continue on to the next page.

View 4 Replies


Similar Messages:

AJAX :: Modal User Control On Top Of A Modal Popup + Javascript Causes Page Flash

Jul 29, 2010

Modal Popup user control (its a message box) on top of a modal popup with javascript that maintains postback on a scrollable div all inside of an update panel causes my page to flash on postback of the user control. If any one of the peices (user control, modal popup, javascript) are missing everything works fine. The javascript is maintaing scrollback on a scrollable listview on the page. A modalpopup is shown on top of this main page that is for report parameters. The user control is used for validation and is displayed if a parameter is invalid. I know this may not be the best design, but it can't really change unless its a minor change. Heres the js if anyone wants to see popup or styles let me know.

//Begin methods to maintain or reset scroll position during postback.
var controlIds = [];
var scrollTops = [];
//Register a control to maintain its scroll position on postbacks.
function MaintainPostback(controlId) {
controlIds.push(controlId);
}
//Find the div/control id in the controlIds array and set its scroll position to 0.
function ResetControlScrollTop(controlId) {
var index = 0;
while (index < controlIds.length) {
if (controlId == controlIds[index]) {
scrollTops[index] = 0;
return;
}
index++;
}
}............

View 6 Replies

AJAX :: Get A Modal Popup Inside A Modal Popup / Fire The Modal Popup On A Condition In A Text Change Event Of A Textbox?

Jan 17, 2010

I am trying to get a modal popup inside a modal popup?, also i want to fire the modal popup on a condition in a text change event of a textbox?...is this possible and can anyone give me directon on this

View 5 Replies

AJAX :: How To Use Modal Popup From Another Page

Feb 4, 2010

how can i use the panel which use as modal popup in another page.

i mean second page is an template page which use from several page and i want the modal popup in that page.

i want show modal popup without show the page.

can i do this in some way?

View 4 Replies

AJAX :: Set Modal Popup At Page Unload?

Jan 25, 2011

I have ajax modal popup for Questionnaire for my website and i want to show it on when user leaving the website.

it is working well with page load event. but i want to call it at the time when user want to close website page.

i have tried with page_unload and dispose event but the page was closed directlly without displaying the popup.

Code:

<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
mdl1.Show()
'chkbox1.Attributes.Add("onclick", "checkBoxListOnClick(this);")
End Sub

[Code]....

dispaly above modal popup on leaving of the website?

View 2 Replies

AJAX :: How To Use Modal Popup In Master Page

Oct 29, 2013

I have problem when i use model popup extender under master page and update panel it not popup but if i use same code without master and update panel then it works.

My code is: (design part)

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
<div id="banner-wrapper"> <div class="container"> <div class="row"> <div class="12u">
<div id="banner" class="box"> <div> <div class="row"> <div class="7u" style="width:197px;">

[Code] ....

Code part:

protected void LnkTaskId_Click(object sender, EventArgs e) { LinkButton btndetails = (LinkButton)sender; 
GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; LinkButton lnk = (LinkButton)gvrow.FindControl("LnkTaskId"); 
SqlCommand cmd1 = new SqlCommand(); cmd1.CommandText = "select Task_Desc from Task_Process where Task_Id='" + lnk.Text + "' and User_Id='" + Session["user_id"].ToString() + "'"; cmd1.Connection = con; SqlDataReader dr2; dr2 = cmd1.ExecuteReader(); if (dr2.HasRows) { dr2.Read(); TextBox1.Text = dr2.GetSqlString(0).ToString(); ModalPopupExtender1.Show(); } dr2.Close(); cmd1.Dispose(); }

View 1 Replies

AJAX :: When Submit The Page Which Has Modal Popup Extender,popup Extender Becomes Visible?

Oct 29, 2010

When i try to submit the page which has modal popup extender,popup extender becomes visible! How can i avoid this?

View 2 Replies

VS 2008 Can Have More Than One Panel And Modal Popup Extender On A Page

Jun 9, 2010

I just added a panel with the ajax modal popup extender and rounder corner extender. It worked great! I then added a second one named completely different and using two different buttons for the TargetControlID. When i run the page, the first one that worked fine does nothing and same with the second when I click either buttons. No errors, etc.

So i want to see if I can have two of these or not? What would cause it to stop when adding another panel with extenders?

View 1 Replies

AJAX :: Modal Popup Does Not Load In Particular Child Page

Jan 6, 2011

I am using a master page for my website, which has a modal popup in it. i have implemented url rewriting to direct user to a child page. In this child page I am using webparts with webpart manager. All of the other pages runs perfectly smooth and also url rewriting works fine except the modal popup in this child page. Although the div is hidden (other pages do not show MPopup on load), here in this child page the modal popup remains statically displayed on the web page. When the particular link on master page is clicked the screen darkens, but the modal popup fails to load. I could see just a small lined colour of the modal popup.

View 6 Replies

AJAX :: Make Modal Popup Scroll With Page?

Jan 15, 2010

I've got a modal popup and when it loads contents that are taller than the browser height I am unable to scroll down to view the rest of the information. Instead the background can scroll but the popup won't, I'd like to have the popup stay in place so the users can see the bottom of the modal.

View 4 Replies

AJAX :: Modal Popup And Background Page Not Grayed Out?

Oct 29, 2010

using .net 4.0 and trying to open a modalpopup with grid loading; it pops up but doesn't grayout the rest of the page, allowing more clicking on the grid. I want the page to grayout with modalpopup and disable any further activity until the grid is loaded.

[Code]....

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" language="javascript">
var ModalProgress = '<%= ModalProgress.ClientID %>';
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
function beginReq(sender, args) {
// shows the Popup
$find(ModalProgress).show();
}
function endReq(sender, args) {
// shows the Popup
$find(ModalProgress).hide();
}
function CallPrint(url, window) {
window.open(url, window, 'left=0,top=0,width=900,height=600,toolbar=1,scrollbars=1,status=0');
}
</script>
<div>
<asp:ModalPopupExtender ID="ModalProgress" runat="server" BackgroundCssClass="modalBackground" PopupControlID="panelUpdateProgress"
TargetControlID="panelUpdateProgress">
</asp:ModalPopupExtender>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style1">
<tr>
<td>
<asp:Literal ID="litMedResult" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td>
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1">
<asp:TabPanel ID="tpFilter" runat="server" HeaderText="Show AICE Filtered Meds">
<ContentTemplate>
<asp:GridView ID="gvFilteredMeds" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
CellPadding="3" GridLines="Vertical"
onrowdeleting="gvFilteredMeds_RowDeleting" DataKeyNames="AICEMedID">
<AlternatingRowStyle BackColor="Gainsboro" />
<Columns>
<asp:BoundField DataField="AICEMedID" Visible="False" />
<asp:BoundField DataField="node_descrp" HeaderText="Med" />
<asp:CommandField DeleteText="Remove From Filter"
HeaderText="Remove From Filter" ShowDeleteButton="True" >
<ControlStyle ForeColor="Red" />
</asp:CommandField>
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#0000A9" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#000065" />
</asp:GridView>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="tpAllMeds" runat="server" HeaderText="Show All Meds">
<ContentTemplate>
<asp:GridView ID="gvAllMed" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
CellPadding="3" GridLines="Vertical" DataKeyNames="node_id"
onrowdatabound="gvAllMed_RowDataBound">
<AlternatingRowStyle BackColor="Gainsboro" />
<Columns>
<asp:BoundField DataField="node_id" Visible="False" />
<asp:BoundField DataField="node_descrp" HeaderText="Meds" />
<asp:TemplateField HeaderText="Add to Filter List">
<ItemTemplate>
<asp:Button ID="btnAddMed" runat="server" Font-Bold="true" OnClick="btnAddMed_Click" Text="Add Med" />
</ItemTemplate>
<ControlStyle Width="100px" />
<HeaderStyle Width="60px" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#0000A9" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#000065" />
</asp:GridView>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel></div>
<div>
<asp:Panel ID="panelUpdateProgress" runat="server" CssClass="updateProgress" >
<asp:UpdateProgress ID="UpdateProg1" DisplayAfter="0" runat="server">
<ProgressTemplate>
<div style="position: relative; top: 45%; text-align: center;">
<img alt="Processing" class="style3"
src="Images/loading.gif" />Processing ...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Panel>
</div>
</asp:Content>

View 8 Replies

AJAX :: Page Is Flickering By Using Modal Popup Extender

Feb 5, 2010

I used modalpopup extender in my application. when the page is loading modalpopups are flikering so it is not looking nice.

View 4 Replies

AJAX :: Use MODAL POPUP With 4 Text Boxes On Same Page?

Feb 3, 2011

I am making an search form from where the person generate its monthly report.I have 4-5 field likeregion,state,city,employee_name,Product_name.with all textboxes i am using ajax:modalpopupextender. Its working perfectly but after 4-5 selection user is able to access the back page info along with the modalbox.I dont now why its happening????

[Code]....

View 3 Replies

AJAX :: Modal Popup Displaying At The Bottom Of Page?

Jul 14, 2010

I have an issue that may be tied to layering of ajax controls. On my page I have a Modal Popup that displays and has multiple input fields on it.One of which is a dropdown list that shows one of two sections OnSelectedIndexChanged. One section has a button that calls another Modal Popup with inputs.

When I cancel/close the 2nd Modal Popup and change the value of the dropdown list the Popup's panel displays at the bottom of the page.I have tired hiding the panel, calling the mpe.hide(); etc but cannot get this panel to stop displaying.

View 6 Replies

AJAX :: How To Add Dynamic ModalPopupExtender Modal Popup To Page

Feb 26, 2014

i have created a class as follows which will create a dynamic popup 

public static void createModal() {
Button btnShow = new Button();
btnShow.ID = "btnCancel";
Panel p = new Panel();
p.ID = "ModalPanel";
p.Height = Unit.Percentage(300);
p.Width = Unit.Percentage(800);

[Code]......

And in my page my design is as follows

<asp:ScriptManager ID="script" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<%--<Triggers>
<asp:PostBackTrigger ControlID="btnShow" />
</Triggers>--%> <ContentTemplate>
<asp:Button ID="btnShow" runat="server" Text="Open" OnClick="btnShow_Click"></asp:Button>
</ContentTemplate>
</asp:UpdatePanel>

This is my code on button click to show the popup

protected void btnShow_Click(object sender, EventArgs e) {
common.createModal(btnShow);
}

If i didnot include the trigger on the page modal is not showing, but if I include the trigger modal popup is showing, can this be achieved with out registering the triggers.

View 1 Replies

AJAX :: How To Show Modal Popup On Page Load

May 7, 2015

I want in my web application that when user opens the website, the very first screen should be a login modal pop up in the centre of the page and every thing around should be transparently black. This screen will take inputs i.e, ID and PW to login and will show other options like to register or visit as a guest.

View 1 Replies

AJAX :: Display Modal Popup On Page Load

Sep 21, 2012

I used below code for show Welcome message in my first page of site index.aspx

protected void Page_Load(object sender, EventArgs e)
{
string message = "Welcome to Our site.";
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script type = 'text/javascript'>");
sb.Append("window.onload=function(){");

[code]....

I want when users come to site when it show index.aspx at first time it show popup menu that i define some control on it like TextBox,button,... and when users click on button, it go to index.aspx/

View 1 Replies

JQuery :: Getting Error In Opening Aspx Page In Modal Popup

Jul 2, 2010

I am trying to open aspx page in jquery modal popup. Its opening fine, but if i am firing any event of that page(page which is inside modal popup) i am getting javascript error:

Microsoft JScript runtime error: 'theForm.elements.length' is null or not an object

View 2 Replies

AJAX :: ModalPopupExtender Modal Popup Hiding Behind Master Page

Sep 20, 2015

I am working on a website where i used bootstrap and popup box is of jquery. whenever a popup appears on the screen it hides behind the master page.

View 1 Replies

AJAX :: Modal Popup Dialog Validation?

Mar 23, 2010

I have a button Import on my page. Upon pressing this button, a modal popup dialog appears where the user can enter path of the import file. I have a required field validator to make sure the user entered the path. And I have there a Submit button. My problem is that validation happens not only when I press the Submit button on the modal popup, but also when I press any button on the page itself, which is wrong.

View 2 Replies

C# - Client-Side Validation In A Modal Popup?

Oct 1, 2010

I've got a gridview/formview, master/detail relationship going on. When I click a button in my formview (item template), I display an ajaxcontroltoolkit modal popup.

On this popup there is a textbox (several, actually). I want to validate the data in this textbox (at least six digits, so far I'm using a regex validator) before I dismiss the popup.

The validator works, but I can still dismiss the form by clicking OK. What I'd like to do is have the ok button on the popup disabled until the data is good.

I have tried fiddling with some stuff in javascript, but I couldn't make it work, as there seems to be some issues regarding finding controls in a formview.

View 1 Replies

AJAX :: Modal Popup Cannot Prevent Users To Interact With The Rest Of The Page

Jun 29, 2010

I am new to ASP.Net. I use the Modal Popup. The popup works but I can still interact with the rest of the page. what I am doing wrong?

View 2 Replies

AJAX :: Modal Popup - Background Page Doesn't Get Fully Grayed Out

Apr 27, 2010

I have a huge content on a page which scroll's down vertically and when I try to popup a modalpopup control on this page, some part of the screen is not grayed out on IE6 and user can interact with the background page ( even when modal popup is open) . This happens only on IE6 works fine on IE8 and firefox .

View 2 Replies

AJAX :: How To Freeze The Background Page After Modal Popup Window Called

Nov 1, 2010

when i call modal popup extender the background is scrolling , i want to freeze the background page then is there any properties or any other idea to get this ..

View 5 Replies

AJAX :: Show Modal Popup Of Previous Page From A Class File?

Feb 1, 2010

In my aspx page, i am calling a .cs file for data access, which also have a try -catch block. and now if any exception comes i want to show the modal popup of previous page.

But I am not sure it's possible or not.

[Code]....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved