refresh

Detect whether the browser is refreshed or not using PHP

落爺英雄遲暮 提交于 2020-01-10 15:25:28
问题 I want to detect whether the browser is refreshed or not using PHP, and if the browser is refreshed, what particular PHP code should execute. 回答1: If the page was refreshed then you'd expect two requests following each other to be for the same URL (path, filename, query string), and the same form content (if any) (POST data). This could be quite a lot of data, so it may be best to hash it. So ... <?php session_start(); //The second parameter on print_r returns the result to a variable rather

listbox Refresh() in c#

て烟熏妆下的殇ゞ 提交于 2020-01-10 14:18:39
问题 int[] arr = int[100]; listBox1.DataSource = arr; void ComboBox1SelectedIndexChanged(object sender, EventArgs e) { .....//some processes listBox1.DataSource = null; listBox1.DataSource = arr; } is not working, also, listBox1.Refresh(); is not working, also, listBox1.Update(); is not working, i know i can use BindingList<T> but i have to work with only array. can you help me how can i refresh listbox? 回答1: try the following listBox1.DataBind() 回答2: my first answer on stack exchange here. C#

Can't refresh jqgrid with loadonce: true

那年仲夏 提交于 2020-01-10 05:39:05
问题 I obviously need to refresh the grid from the server after I create/edit/delete a row. I have checked all of Oleg's aswers regarding the reload and I still can't make it work. What am I doing wrong? Why does a such simple matter have to be so complicated. I would also like to close the forms after posting.. but that's the next step Here is my code: $(function(){ var roles = null; $.ajax({ 'async': false, 'global': false, 'url': '<?php echo base_url().'utils/Admin_Rest/get_roles'?>', 'dataType

Disabling RichTextBox autoscroll

徘徊边缘 提交于 2020-01-10 03:04:45
问题 I am using RichTextBox control for displaying application logs. I am updating control once a second with a few calls of RichTextBox::AppendText method. What is really annoying for me is that cursor keeps scrolling to the last line of text. Its very uncomfortable in situation when user needs to analyze logs that are at the beginning. I have tried following solution to my problem: int pos = tb_logs.SelectionStart; tb_logs.AppendText("log message"); tb_logs.SelectionStart = pos; This does not go

Disabling RichTextBox autoscroll

十年热恋 提交于 2020-01-10 03:04:38
问题 I am using RichTextBox control for displaying application logs. I am updating control once a second with a few calls of RichTextBox::AppendText method. What is really annoying for me is that cursor keeps scrolling to the last line of text. Its very uncomfortable in situation when user needs to analyze logs that are at the beginning. I have tried following solution to my problem: int pos = tb_logs.SelectionStart; tb_logs.AppendText("log message"); tb_logs.SelectionStart = pos; This does not go

Auto refresh div causing browser to hang

会有一股神秘感。 提交于 2020-01-07 09:04:16
问题 I am working on a project using code igniter framework and one part of it is to auto refresh a div. However, after it auto refreshes the first or second time, the browser seems to slow down and eventually hangs. I've tried two methods of auto refreshing, these are the codes I used. First method using setInterval, refresh every 1 minute: <script> $(document).ready(function() { window.setInterval(refreshDiv, 100000); }); var refreshDiv = function() { $('#lot_info').load('<?php echo base_url();?

Java Applet Panel Refresh

偶尔善良 提交于 2020-01-07 09:03:09
问题 I have a Java Applet that loads a record of a board game from a URL and displays the configuration using a series of panels laid out in a grid and nested in a JPanel. This is a small component of an overall applet with text fields and such for inputs and outputs. When a button is pressed, I want the board to show the next configuration from the record. I figured out a way to do this, but when the button is pressed, the same configuration is shown, but when I scroll up or down, or resize the

Java Applet Panel Refresh

徘徊边缘 提交于 2020-01-07 09:03:02
问题 I have a Java Applet that loads a record of a board game from a URL and displays the configuration using a series of panels laid out in a grid and nested in a JPanel. This is a small component of an overall applet with text fields and such for inputs and outputs. When a button is pressed, I want the board to show the next configuration from the record. I figured out a way to do this, but when the button is pressed, the same configuration is shown, but when I scroll up or down, or resize the

Update listBox on Main page from button click event on child window.

…衆ロ難τιáo~ 提交于 2020-01-07 08:29:28
问题 I have a Main page that contains a listBox. When a user selects a profile form the list box, this opens up a child window called pWindow . This window as the option to delete the current profile via a hyperlink button that opens up a another confirmation window called dprofile . My question being is it possible that once a user has confirmed to delete the current profile they are in, and confirmed it in the button click on dProfile , how can I update the listBox in the first Main page so that

How to refresh or reload a page with timeout in javascript or jquery

梦想的初衷 提交于 2020-01-06 17:46:08
问题 How can I refresh or reload a page with timeout in javascript or jquery only when a specific class is visible or img is not found i found this https://stackoverflow.com/a/14787543/7051635 but there is no timeout and when i'm in front of an omg not found, nothing happened. 回答1: Use the setTimeout() global method to create a timer. This will reload the page after 5000 milliseconds (5 seconds): setTimeout(function(){ location.reload(); }, 5000); This code can be added to any event you need it to