C# - Page Disappears When Scriptmanager Calls Jquery Dialog.
Sep 3, 2010
I got a problem in my Asp.net application.When I try to save some data, I check if the data is right, When not I call a jquery dialog with the error message. But when my jquery dialog appears, my background form dissapears.and I get a javascript error: "html parsing error unable to modify the parent container element before the child element is closed".This is my jquery dialog call in codebehind:
string script = "openDialog('" + text + "', '" + title + "');";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "open", script, true);
function openDialog(text, title) {
ar $dialog = $('<div></div>')
.html(text)
[code]...
View 1 Replies
Similar Messages:
May 27, 2010
I have a gridview control with delete asp:ImageButton for each row of the grid. What I would like is for a jquery dialog to pop up when a user clicks the delete button to ask if they are sure they want to delete it.
So far I have the dialog coming up just fine, Ive got buttons on that dialog and I can make the buttons call server side methods but its getting the dialog to know the ID of the row that the user has selected and then passing that to the server side code. The button in the page row is currently just an 'a' tag with the id 'dialog_link'. The jquery on the page looks like this:
$("button").button();
$("#DeleteButton").click(function () {
$.ajax({
[code]...
The dialog itself is just a set of 'div' tags. Ive thought of lots of different ways of doing this (parameter passing, session variable etc...) but cant figure out how to get any of them working.Any ideas are most welcome
View 1 Replies
Nov 14, 2010
How do I go about making true ajax requests to an asp.net page? (Not update panels). I read this tutorial but couldn't get it working. Is there a better approach? Or should this work?
[URL]
View 2 Replies
Jun 6, 2010
I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).
So, how do I setup my WCF service to accept calls from an SSL-secured page? Does the WCF service also need to be secured? If so, how do I do this?
View 3 Replies
Feb 2, 2010
Trying to put multiple dialogs on one page - they need to be able to come up more than once. I'm using ASP.NET so the ID's of the content to go in the dialogs are mangled. All of the examples for bringing up the dialog multiple times seem to work with getting the initialized dialog back the second time by using the contents ID.
I see a couple of possible solutions but they seem like hacks:1.) Store the .net mangled ID in some other field when I first bring up the dialog, and use that the second time around.2.) Use the dialog events to put the contents of the dialog back into its original location in the dom when the dialog is closed.
<ol>
<li><div id="dotnetmangledjunk_Meaningful">stuff to go in the dialog</div></li>
<li><div id="dotnetmangledjunk_Meaningful">stuff to go in the dialog</div></li>
</ol>
View 2 Replies
Jan 7, 2011
I have a aspx page where I have a linkbutton and upon clicking that link button I am calling another aspx page passing a parameter in a pops up window, like below:<asp:linkbutton id='lbtn1' onClick=<%#"window.open('/testsite/mypage.aspx?param=abcd');return false"%>Till now it was working fine but now I have to include my page to another site where they have used JQuery for popup dialog and asked me to load my page using the same.I am really new to JQuery and have no idea about. I tried searching through this forum and google but no luck.Can someone please help me and show me how can I achieve this (please don't mind but a code example would be really appreciated)
View 3 Replies
Feb 23, 2011
im displaying an Dialog, its working well. but when i scroll down the page then there the popup is not visible(it rendered where it is displayed),i want to show the Dialog on the page entire place even if i scorll down/up.
View 5 Replies
May 25, 2010
I have a really odd behavior here: I created a little popup dialog in jQuery UI, and in my test HTML page, it works flawlessly. When I click on the button, the popup comes up, covers the background, and remains on screen until I click on one of the two buttons (OK or Cancel) provided.
So now I wanted to add this into my ASP.NET 3.5 app. I wanted to add it to a GridView inside a user controls (ASCX), which is on a page (ASPX) contained inside a master page.The jQuery 1.4.2 and jQuery UI 1.8.1 scripts are referenced on the master page:
<body>
<form id="XXXXXX" runat="server">
<Ajax:ScriptManager ID="masterScriptManager" runat="server" ScriptMode="Auto"> [code].....
Update: OK, one problem is solved - it appears that for whatever reason, the default MS Ajax stuff is adding some kind of an "observer" to my popup dialog and closes it right away after it shows up
So I changed the OnClientClick="showDialog();" to OnClientClick="showDialog(); return false;" and how that doesn't happen anymore - the dialog box pops up and stays there until I click on either of the two buttons (OK and Cancel).
View 1 Replies
Jan 8, 2010
Is possible to do that?
View 1 Replies
Oct 19, 2010
[Code]....
show / hide modal dialog box on page load?
View 6 Replies
Apr 1, 2011
need to open an aspx page (called editItem.aspx in code below) loaded dynamically inside a jQuery UI dialog from a parent aspx page. the child page
has a button server control and should go back to parent page after postback. with the following code I get the error"The state information is invalid for this page and might be corrupted"
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="popOver.aspx.vb" Inherits="test5.popOver" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
[code]...
View 3 Replies
Oct 18, 2010
I'm having some trouble with jQuery UI. I've created a dialog with jQuery UI: so far, so good. I set up a form inside the jQuery UI dialog and then it's another story. I've written a very simple page to illustrate:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testpage.aspx.cs" Inherits="RiverCascade.testpage" %>
<head runat="server"> [code]....
In the code above, see that I've just imported the jQuery, jQuery UI, and stylesheets and set up a page with a dialog box. There is an asp control button1 outside the dialog box and an asp control button2 inside the dialog box.
When I click on button1, the event handler gets called and all is well. However, when on click on button2, the button inside the jQuery dialog, nothing happens.Why is my web page behaving this way?
View 2 Replies
Jan 31, 2011
I am having weird display issues using the jQuery dialog with an iframe in Firefox and IE8.
I have tested the page itself outside of the iframe and the problems are not reproduced, only when inside of the jQuery dialog.
Issue,image actual size: 300x225 image display size: 400x300
JS Code - Parent Page
$(document).ready(function() {
var img = $('.photoLink');
var imgSrc = img.attr('src'); [code]....
The class of the image is set dynamically based on image dimensions.
The image path is set in the code behind, no styling or resizing done.
The images are resized upon upload to be no larger than 300x300.
Display is correct in Chrome and Safari, but in IE and FF for some reason it enlarges the image.
View 2 Replies
Dec 20, 2010
$(document).ready(function() {
View 1 Replies
Apr 2, 2011
I load an aspx page in iframe inside a jQuery UI dialog to update some data, and after dialog is closed I need to update an updatepanel in parent page. how can I do that? to be more specific, there is a datagrid in parent page and after I edit data in a dialog modal iframe, I want to update the row in datagrid.
View 4 Replies
Nov 11, 2010
Here is my setup: I have an asp.net button on a page --
<asp:Button id="btnSelectEmp" runat="server" Text="Select Employee" />
I have a .js file with the following jQuery click event --
$("input[id$='_btnSelectEmp']").click(function ($e) {
$("div[id$='_divEmpSearch']").css("display", "inline");
$e.preventDefault();
});
As you can see, clicking upon the button will set a div visible. Nothing special; not rocket science. The div is wrapped with an asp.net update panel, and it contains an asp.net user control (.ascx)
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="divEmpSearch" runat="server" style="display: none;">[code]....
The button in the user control that does a postback is working great. I click it, a postback occurs and my div control is re-hidden. I can then click on the Select Employee button (the one that I supplied the code for at the very first of the question) and the jQuery click event is handled and the div will be reshown.However, the button in the user control that does an asynchronous postback works also, but after it hides the div, if I then click on the Select Employee button the jQuery click event will not be handled.What this tells me is that for some reason during an asynchronous postback to the page, something happens to the Select Employee button so that the jQuery click event no longer happens. Why?
View 4 Replies
Feb 21, 2011
im using jquery. is there any way to broke the Dialog popup as diamond shape or any other shape?and how to provide minimize and maximize buttons on the dialog?
View 5 Replies
Oct 12, 2010
I have a problem with a AJAX call I do in a application. It's a MVC application (ASP.net c#) with a lot of javascript.
When I do a call from my javascript to a controller (through a ajax call) the call gets to the class and function, but the data isn't there. The data is send in JSON.
I found a few of the same problem but most of the time they used another name voor de parameter then it is in there json.
Here is the code
[Code]....
View 3 Replies
Jan 13, 2011
I am having an aspx page in which I am calling a user control. The user control I am using a pop up to display it when a user clicks a asp:linkbutton. In that user control I am having a textbox and I am calling a Jquery Blur to do some validation. While doing so the function is calling [blur] is calling twice. I just called an alert() with the textbox value.So I can see the alert is coming twice .What I need to do to avoid the second time. I need to do it only whenever the user going out of the textbox and that also one time.
$('#<%=txtCategory.ClientID %>').blur(function() {
alert($(this).val());
});
View 2 Replies
Sep 11, 2010
I would like to have a contact form which contains a reCaptcha, and have that form inside a jquery ui modal dialog.
All works well, except that I have a submit button for the form - which closes the modal dialog wether the recaptcha is valid or invalid.
I tried adding onClientClick="return false;" to the submit button, but it still posts back, and closes the dialog.
how do I remain inside the dialog ?
View 3 Replies
Dec 21, 2010
I'm assigning a div containing an ordinary grid view to the content of a jquery dialog, but the gridview is omitted from the dialog. I've tried even building the dialog fresh on a button click in case it's having a hard time binding to the data-refreshedgrid. No Joy.
function showDialog(headText) {
View 2 Replies
Jun 22, 2010
what is the correct way to pass data through the AJAX calls and have it be model-binded into an object inside my Controller Action?
So far, I've read in some places that jQuery sends data in key-value pairs, so I don't have to do anything extra, while in other places, I've read that I have to first use a JSON deserializer and then bind the result. I've currently implemented my Controller Actions as ones that accept HTTP POST.
View 2 Replies
May 3, 2010
Old school coders are used to having every server control create events in the .cs files.. for example.. Getting the Initial load of data, Saving Data, Deleting data... and then binding datasources to the server control..
New school coders want to do it in Jquery + AJAX calls to .svc files... That gives automatic no post backs so that is a advantage... and I think its a different way of thinking.. All of a sudden the UI related events are all being done in Jquery..
What is the most modern and efficient way to go ? How can I convince the old school coders to let us you this new paradigm ? (assuming it is the better way)
View 3 Replies
Sep 21, 2010
I am working on web application in which all of the data I am submitting back to the server is being done on the client side using JQuery AJAX calls to my .NET web services using JSON. This works perfectly to enhance my user experience and greatly reduces post backs, etc.What I am looking for suggestions on is securing the web services being exposed to the client side from being used by anything but my JQuery code on my site. The security hole that I see here is that since the client-side JQuery can access the web services, so could anything.
View 2 Replies
Nov 23, 2010
Is there a way to use the .NET ScriptManager in Explicit mode to inlcude the CDN JQuery file(s)? There is plenty of dicussion and information about including the indivudual AJAX framework files such as "MicrosoftAjaxCore.js", but since AJAX uses JQuery, I thought there might be a way to explicitly include the JQuery file(s) using the ScriptManager rather than hard coding an address to the MS CDN.
View 3 Replies