JQuery :: Close A Parent Form?
Sep 27, 2010how to close a parent form
View 4 Replieshow to close a parent form
View 4 RepliesIn my website I have two forms: parent form and child form(dialog box). Their expected behaviour is like this: if clicked on 'show' button on parent form, a dialog form opens that displays a gridview. In dialog form, if clicked on 'select' button it closes
itself and returns value in selected row back to parent form.
To achieve this I write following code (.cs) : in parent form:
void ShowBtn_Click(object sender, EventArgs e)
{
StringBuilder jScript = new StringBuilder(); [code]....
Now problem is: the code in parent .cs works fine, it opens the dialog properly. But when clicked on 'select', instead of returning back to parent, it opens the same dialog again in new window. This newly open window says "Done but error on page" at left bottom.
i have 3 iframe how to access the paten(t textbox value=1) in the 3rd iframe
View 6 RepliesI have one webform and two popups. I am opening 1st popup using window.open method from my webform and it is working fine. then i am opening 2nd popup as showmadaldialog from 1st popup.
my second dialog have one button and if i click the button my two popup's(one popup and one dialog) should be closed and my webform should be appear.
currently am able to close 2nd popup. but am unable to close 1st popup from second popup.
[note : two popups are modal dialog] ....
I've a parent page with a long form. I am opening ajax modal popup extender on the click of a radio button.
Parent.aspx
[Code]....
In child.aspx, I've another long form. When the submit button is clicked, I am doing some processing, after that need to close the modal popup window and refresh my parent page, without disturbing the values already entered in the parent page.
child.aspx
[Code]....
child.aspx.cs
[Code]....
My questions are
1. How do close the modal popup?
2. How I do refresh the parent.aspx without disturbing existing values? My browser is IE, no firefox since it's in intranet.
I have a blog, where people can make comments. I've now decided to put the "writecomments.aspx" file in a Greybox popup-window. It works, but I want to close the window from codebehind (or javascript) after the comment is written. And then I want to refresh the blog page (the parent page) to show the new comment.
This is the code that opens the greybox (writecomments.aspx) page:
<a href='WriteComments.aspx?BlogId=<%# DataBinder.Eval(Container, "DataItem.id") %>' rel="gb_page_center[500, 500]">Skriv kommentar</a>
In the writecomments.aspx file, I just have 2 textboxes and 1 button (save-button). How can I make the greybox window close itself, and then somehow refresh the blog.aspx? Or maybe just a specific updatepanel for the current comments?
Edit
I got it working, I had to put this code in the codebehind, after the db-insert: Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "parent.parent.GB_hide();", true); And for the refresh of the parent page, I edited the gb_scripts.js file on line 12 from false to true: this.reload_on_close=true;
EDIT AGAIN
Actually, I modified it a bit, so, I put the gb_scripts.js file back to it's default state, and I just just the followig line of code in the WriteComments.aspx codebehind file, just after the db-insert:
Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "parent.parent.window.location.reload();parent.parent.GB_hide();", true);
Now, the Greybox is closing, and then, the blog page is refreshing, just like I want :)
I'm using 3 diff websiteA,B.C. Im logging in A and accessing B,then logging out it means B has to close;then the redirection is A.likewise C to B.
View 2 RepliesI have a web form called default.aspx which has a form with user information. In addition to this, I have an iFrame on the same page that displays a page Secondary-Form.aspx that has a few additional dynamic data fields. I need to do two things.
1. I need to pass the parent form data in real time to the iFrame page to refresh its content and modify it's fields accordingly. Example: If the user submits their Vehicle Choice as Car on parent form, the form item in iFrame will display a radio button that says Honda, and if the user submits their Vehicle Choice as MotorCycle in the parent page, the iFrame will display Harley Davidson as the radio button choice
2. The submit button is on the parent page. I want both pieces of this information (from the parent page, as well as iFrame selection) to be passed to a server side ASPX page to process this information.the default.aspx and Secondary-Form.aspx files are located on different domains.
how to open a subform model Form,Sub Window form using jquery that save the data ajex
View 4 RepliesI've been searching for a while for a solution to accomplish above subject, I have a win app for handhelds in which the user can navigate through several windows forms form.showdialog() The question is how to close all windows and terminate the app when user press exit button.
process.getcurrentprocess().kill(); --> didn't work Foreach (Form frm in Application.OpenForms) --> doesn't work in .net Compact Framework frm.Close();
I mean if I use form.show() to open the windows, it works with Application.Exit();, but I want to prevent the user navigate away from the current form thru the icon for open windows on the right lower corner of the handheld, unless he press the close button of the form, that's why I use form.showdialog(), the other approach could be to show only the current open form of the application if the user press the icon for the open windows on the right lower corner.
I have a login page that is loaded in popup window (colorbox) and after user logs in it should be closed and parent window should be loaded with new page.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Do While reader.Read()
If Trim(reader("ZAP").ToString()) = Trim(textBoxZap.Text) Then
Session("A") = "1"
Response.Redirect("~/default.aspx")
Else
lblErr.Text = "incorect"
End If
Loop
So once the buton is clicked and user name and password is corect popup window should be closed and user redirected to default aspx.
Refresh the Parent Window. I open the child window,I want that on close button click on child window,parent window refreshes
Code:
[code]....
I searched all on the net & find the above soln,But its not refreshing.when i click on button1,then some Pop up appears see in Pic(with buttons Retry & Cancel). When i click on Retry again the child window loads Then again i click on button1,again popup appears & so on & on.
Following is my requirement :
I have 3 asp.net web pages. From the 1st page i am opening showmoadlDialog(2nd page) in which(2nd page) i am storing some value in session(Ineed to do this here only) and checking some count which is coming from database, If count is Zero it will display message but if some value is there and then if i click on Ok button it will redirect to 3rd page. And close the 1st and 2nd Page.
how to do this ?
When i am clicking on Ok button it is showing some cofirmation message(Do you want to close this window) but this i dont want.
I have created an intranet application in ASP. From my main web page I am opening a web browser window and adding a record to database from that new window. Now on close of that window I want to refresh my main web page to reflect the database changes. My backend is "ms access" Also on the other hand I also want to disable the closing button of web browser.
View 2 RepliesIam using thickbox for my project i am calling multiple thickbox, i need to close thickbox ( that is thickbox inside thickbox)
View 5 RepliesI'm using this jQuery app's iframe, it has a close button, but I need a javascript function to close it also, is that possible?
View 5 Repliesi designed a gridview and innergridview. design seems below
Master Data
Detail Data
Master Data
i have some hidden control in the master record, in child row when i click an link button then i want to read that hdden value so, i use below code var data1 = closestTR.find('input:hidden[id$=hdnData1]').val(); but its not working , the same code is working with the event from Master Record. may i know how to read that master row record from the child row using jquery.? for this master and child row concepts i used below syntax
<gridview>
<HeaderTemplate>
<table>
<tr><td>This is for Master Row Header</td></tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr><td>This is for Master Row Data</td></tr>
</table>
</ItemTemplate>
<innerGridview>
<HeaderTemplate>
<table>
<tr><td>This is for Detail Row Heading</td></tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table>
<tr><td>This is for Master Row Data</td></tr>
</table>
</ItemTemplate>
</innerGridview>
<gridview>
I'am new to MVC. I've tables with subject(subjectId, subjectDesc), marks(subjectDesc,Marks,Remarks). I want 'CREATE' view in marks as following
for each subjectID it has to create on row with subjectDesc (listbox), Marks(textbox), remarks (textbox).
Work on asp.net vs08 C#.i have a page .From this page i need to call a page on popup.On the popup page selected value will be set on the parent page text control.1) One parent page2)One child page.3)call parent to child as popup.4)On popup window contain a grid.5)on popup grid have command select,click on select close popup and selected value will set on parent page text control.
View 1 RepliesI have a class UserControlBase that inherits System.Web.UI.UserControl and my user controls inherit UserControlBase class. UserControlBase has some common functions that are used in all user controls.
I want to put error display funtion to UserControlBase as well so that I may not have to declare and manage it in all user controls. Error will be displayed in some label in usercontrol. Issue is how to access label which is in usercontrol in UserControlBase in function ?
I have a webform (parent) with embedded webgrid(child) which uses sqldatasource. What I wanted to accomplish is to save both the form data and the grid data when the Save button is clicked. I tried to save form data(parent) in sqldatasource1_inserting event, does not work. I think there should be a way to do it, just do not know how.
View 4 RepliesI have a scenario where i want user to open a popup or other page from a web form to search contacts from database and add them to list and when done return that list back to parent form field and continue filling other fields.I have 2-3 user input which should take multiple values for each field from list of values and i wanted to implement this using pop up based search and add method (other alternative was to use dropdown with checkbox but the list is so big and it is not user friendly to use that)
Is this feasible using asp.net or is there a better architecture/method in .NET to implement this type other than popup based search and retrieval.
I have an asp.net application in which I have a parent form and in that on load I am adding sub forms dynamically having a submit image button..
When I am clicking the button of one form then I am able to read the hidden variables using request under parent form .But on clicking the second button the hidden variables of parent form are having null value although i have assign the value to them using context variables.
how can i handle mulitple form action for same page
i have a tree view how i find his parent
HR
IT
Computer
if we selected Computer
Than value is
Parent2=IT,
Parent1=HR
How to show value parent window from i frame (Jquery write in parent window)
Parent window
[Code]....