refresh

Refreshing one section of a page using Ajax context

大兔子大兔子 提交于 2019-12-06 12:20:27
问题 I'm trying to refresh just one part of my page when a user clicks a 'clear' button, currently I'm using a bit of code I hacked off another answer I found on here: $('.clear').click(function () { $.ajax({ url: "", context: document.body, success: function (s, x) { $(this).html(s); } }); }); This reloads the whole document body, how do I target a particular div or class? context: document.body.somediv? 回答1: jQuery API about the context option: This object will be made the context of all Ajax

Refresh tableview after delete a tableview cell and refresh view controller

ぐ巨炮叔叔 提交于 2019-12-06 11:47:47
I need answer for swift by the way. Basically, I have two questions for refreshing. If you think the code is too long to look at, this is what I'm trying to do. one is to refresh the tableview after clicking on the delete button on one of the tableview cell. I've tried refreshcontrol, it didn't work and it wasn't what I wanted but it would be cool to have them. My other question is, how to refresh a view controller by clicking on of the buttons. And here is the code. The delete button is inside of my custom cell class class postCell: UITableViewCell{ @IBOutlet weak var deleteBtn: UIButton!

javafx treetableview cell value not getting updated

我的未来我决定 提交于 2019-12-06 11:45:41
问题 Event after updating the data model javafx treetableview cell value not getting updated. I am using the sample code here @ http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/tree-table-view.htm (Example 15-2) On click of button i m trying to update first item: employees.get(0).setName("Test"); Is there any trick using which treetableview can be updated? 回答1: The example, somewhat strangely, returns a ReadOnlyStringWrapper wrapping the property values for the cell value factories.

Is spring application context reloading via ConfigurableApplicationContext refresh() considered bad-practice

故事扮演 提交于 2019-12-06 11:33:06
We have a Spring application that is hosted on a shared tomcat instance . Sometimes we have to reload the spring application context but don't want to restart the Tomcat server, because other application's are hosted there as well. Is refreshing springs application context via ((ConfigurableApplicationContext)applicationContext).refresh(); considered bad practice ? What alternatives do I have? A few issues that might arise - Firstly, refresh() should destroy all beans currently living in the context (singletons etc) and recreate them, so any bootstrapping that might happen will happen again

jQuery.post refreshes my page?

谁说胖子不能爱 提交于 2019-12-06 11:02:47
I have the following code with a form on my page. But when I click submit, it seemed like my page refreshes. form: <form action='#' method='post'> <div><input type='text' name='name' /></div> <div><input type='submit' value='Save' /></div> </form> JS: <script type='text/javascript'> $(document).ready(function() { $('form').bind('submit',function() { var str = $('form').serialize(); $.post("save.php", { formString: str }, function(data) { alert("Saved: " + data); } ); }); }); </script> Thanks a lot for any help! set a return false; to your form (for example on the onSubmit). Your form is sended

Update and refresh wpf chart

假装没事ソ 提交于 2019-12-06 10:41:24
I'm working with chart of wpf toolkit, and I can't view the inserted data of the chart... Here is the xaml part: <chartingToolkit:Chart Height="352" HorizontalAlignment="Left" Name="profilo_cale_chart" Title="Profili cale" VerticalAlignment="Bottom" Width="655" FontSize="16" Margin="252,0,0,55" Visibility="Hidden"> <chartingToolkit:AreaSeries DependentValuePath="Value" IndependentValuePath="Key" IsSelectionEnabled="True" ItemsSource="{Binding}" Foreground="#FF242424" Background="LightSteelBlue" /> </chartingToolkit:Chart> And the cs: Declaration public partial class MainWindow : Window { ...

how to refresh my gridView?

南楼画角 提交于 2019-12-06 09:37:44
I have a ListView . When I click on the button of the row of listview, a button will be created in the main.xml , I am having the onclicklistener of the button in custom listView adapter. I am saving the click of that button in sqlite and by that sqlite I am updating the gridview adapter. So my question is when I click on the button, the GridView is not updating itself and when I close the application and open it again it gets updated. I tried using notifydatasetchanged() but didn't work.. This is the code in custom List View adapter holder.checkbox.setOnClickListener(new View.OnClickListener(

Refresh iframe without refreshing the parent page

谁都会走 提交于 2019-12-06 08:57:50
I have a page that constantly refreshes itself, I want to include the page into my main page. I am using an iframe to include the page to my main page, but every time the page in the iframe refreshes, it also refreshes my main page. How can I make the iframe refresh within its own frame and not affect my main page? Or is there a better way to include the page without using iframes? document.frames["myInnerFrame"].location.href=fl; http://www.hotscripts.com/forums/javascript/15955-javascript-command-refresh-iframe-content.html http://forums.asp.net/t/1309969.aspx If you need to refresh the

React Router - Stay at the same page after refresh

半腔热情 提交于 2019-12-06 08:05:17
问题 I'm learning React. I have page with 4 subpages and i use React Router to go through those pages. Everything works fine except for reloading page. When i go from page "home" to "about" or other it's ok, but when i refresh page then it render again page "about" for a second and then it change page to home (home is default/first page).I want it to stay at that page which is currently rendered, not go back to home after every refresh. There is my code in index.js file where i render whole app

Why doesn't asp:UpdatePanel refresh an Image?

[亡魂溺海] 提交于 2019-12-06 07:58:08
I have the following UpdatePanel that gets an image from an ashx handler all of which works fine when the page is refreshed. However, when the timer fires, the label is refreshed with current time, but never the image. <asp:UpdatePanel runat="server" id="TimedPanel" UpdateMode="Conditional"> <ContentTemplate> <asp:Image ID="Image1" runat="server" Height="218px" ImageUrl="~/getImage.ashx?cam=1" Width="303px" BorderWidth="10px" /> <asp:Timer ID="UpdateTimer" runat="server" interval="1250" ontick="UpdateTimer_Tick" /> <asp:Label ID="DateStampLabel" runat="server" /> </ContentTemplate> <Triggers>