I have a simple ASP.NET page with a Grid view (pulling data form SQL-DB), a textbox and a save button.
To add info; the user Inputs info into Textbox and press Save Button. When the user clicks on save button, s/he is presented with a JavaScript pop up saying “Saved”
Everything is working perfectly fine; the only problem I am having is; after this JavaScript pop up the Grid view just zooms.
How can I fix it?
Response.Write("<script>alert('Saved')</script>");
Zooms
The contact in the Grid view expends in size However goes back to normal after a Page refresh.
Try this one, instead of Response.Write()
ClientScript.RegisterStartupScript(this.GetType(), "scriptSave", "alert('Saved');", true);
Related
I have a Django view, where the user can choose between 2 different "views" of a list through a toggle button. The map view where a map is displayed with markers and some information and a list view where a list is displayed with the same information but with a list view.
When the user clicks the toggle button between one or another option, there is no problem, because I implemented an onClick Javascript function where I change the style display, and that works perfect, the problem is when the user reloads the page.
supposes that I put by default the map view, but the user change to the list view by clicking the toggle button, now if he/she reload the page, the view will have to be the list view, I know that I can accomplish this using a cookie but I don't know how to implement the update of the cookie every time the user clicks one of the toggle buttons with vanilla Javascript or in my python view.
I know that one solution may be creating 2 Django views one "mapView" and another "listView" so when you click the buttons take to another URL, but I want to load all the information and have the possibility to do it without this solution.
I also upload a GIF of how it works right now. I clicked the map view, reload the page, and change to the list view again.
Thank you!
I use a Javascript function to save a cookie with the view and solve this.
I have an application which stores and displays data from the database...
On the page displaying records i have put a button which when clicked it asks for confirmation(bootstrap modal) and then delete data in the database
I am using bootbox to display the alert box for confirming user action,it is doing just fine and displaying the bootbox but with an overlay and the bootbox buttons are not clickable
Can anyone assist me on how to do this...I am stuck for almost 3hrs now
I amusing and Jquery Mobile, bootstrap and ajax to do an app and i encounter this situation in my input area where everytime i click the share button to post some info the the db
the input area keep stacking up each time i click the share button. However, it does not affect my textarea and everytime i refresh the page the input area went back to normal. whats wrong with the input area?
My code: https://jsfiddle.net/k0q06eq2/1/
I have a simple Lotus Notes XPage with only an editable RichText dialog that is embedded in a bigger form using an iframe.
The bigger form has a submit button, which triggers some javascript and finally a notes agent which saves all non-richtext values that are inside the bigger form.
Of course the user shall not have to use two submit buttons, so I won't have a (visible) submit button for the XPage. Instead, I want to use javascript to tell the iframe to submit the form.
Using iframe.document.forms[0].submit() does not work - the form is indeed submitted to the Notes server, but XPages won't save the changes I made.
Using a simple XPage button with the action "Save Data Sources", saving works like a charm, but I don't want the user to have to click two buttons in the correct order.
I also tried the following javascript code to fill some invisible fields with the values that IBM submits to the server, but this does not help either:
iframe.document.forms[0].elements["view:_id1:inputRichText1_h"].value = iframe.document.forms[0].elements["view:_id1:inputRichText1"].value;
iframe.document.forms[0].elements["view:_id1:inputRichText1_mod"].value = true;
iframe.document.forms[0].elements["$$xspsubmitid"].value="view:_id1:_id4";
iframe.document.forms[0].elements["$$xspsubmitscroll"].value="0|0";
iframe.document.forms[0].submit();
So now I ask you: how to correctly submit that form content, without the user actually clicking the XPages button? Can I programmatically trigger a click on that button, which would be indifferent from a human actually clicking, except for the human?
have an ordinary div with a fixed id and inside this div have a computedtext that will compute the clientsideid of the "save button" and return that inside the div
and use this clientside js code to do the actual click
var id=iframe.document.getElementById("button").innerHTML
var button=iframe.document.getElementById(id)
button.click()
Can anyone please help me with the following situation?
I've a default.aspx page in which I've 3 user controls.
In one of the user control (say UC1.ascx), I have a gridview which has controls like hyperlink and textboxes. On hyperlink click, I am opening another page in which I've another user control (say UC1.ascx) where some data is fetched from the database and displayed in a gridview. The user will select some of the data and on button save clicked, I am saving the data into a session variable as well as closing the page simultaneously.
My problem is on this button save clicked, I want to update whatever data the user selected to be posted back to the UC1.ascx and bound to the textbox.
I'm not sure how to go about this in javascript. Got suggestion to use ASP.NET Ajax update panel. I'm completely new to ASP.NET Ajax. So somebody please help with the Ajax approach.
The page you close will need to set a value in the original window via javascript assuming the original opened a new window/popup as listed below.
However - have you thought about any other methods, such as ajax requests/update panels on the page to show other dynamic portions of data?
See: http://www.codingforums.com/archive/index.php/t-61319.html
specifially glenngv's post:
function setColor(color){
if (opener && !opener.closed){
opener.document.theForm.theField.value = color;
opener.focus();
}
window.close();
}