refresh

Auto refresh a specific div blogger javascript

断了今生、忘了曾经 提交于 2019-12-01 20:35:13
I use a Javascript widget on a blogspot. It include a div with some javascripts that get some "non-statical" strings from a server and print them on the page. Until here everything works fine, the problem is that I would like to update the execution of this div every few seconds in order to have updated strings, without refreshing the whole page, but just the specific widget (div). I have added another script that tries to refresh the specific div, but I had no luck. Please see the code below <div id="info"> <b>Song:</b> <script type="text/javascript" src="xxxx"> You appear to have javascript

Refresh Jtable

老子叫甜甜 提交于 2019-12-01 19:55:42
I have a JTable created from Vector. How can the JTable be refreshed to display new data that is added to the Vector? tddmonkey Your JTable should update automatically when a change to the TableModel happens. I'm taking a leap here but I'm guessing that you're not using your own TableModel and just called the JTable constructor with your Vector. In this case you can get a hook on the TableModel and cast it to a DefaultTableModel and then call one its notification methods to let the JTable know of a change, something like: DefaultTableModel model = (DefaultTableModel)table.getModel(); model

How to get a class file by Eclipse?

我们两清 提交于 2019-12-01 19:15:16
问题 I wrote an application in the Eclipse, which was successfully compiled and run. After that, in a corresponding directory I found *.java and *.class files. Then I have deleted the *.class file and now I do not know how can I get it back. Eclipse writes me "A class file was not written. The project may be inconsistent, if so try refreshing this project and building it". By the right click on the project I got a drop down menu in which I found "Refresh" but I cannot find out how can I "build"

Refresh browser's page programmatically, from a .Net WinForms application

旧城冷巷雨未停 提交于 2019-12-01 18:47:34
From asp.net page, via ClickOnce deployment, a .Net WinForms application is started. At a certain point the WinForm application needs to refresh the web page it was started from. How could I do this? How could a .Net based windows application refresh a page that is already opened in a browser? This is not easy to do in a way that is robust. Users may not be using IE, for example. The only thing you control and that is common to the web page and the windows app is your web server. This solution is convoluted, but is the only way I can think of that would work. 1) Get the web page to open a long

How to get a class file by Eclipse?

大憨熊 提交于 2019-12-01 18:24:13
I wrote an application in the Eclipse, which was successfully compiled and run. After that, in a corresponding directory I found *.java and *.class files. Then I have deleted the *.class file and now I do not know how can I get it back. Eclipse writes me "A class file was not written. The project may be inconsistent, if so try refreshing this project and building it". By the right click on the project I got a drop down menu in which I found "Refresh" but I cannot find out how can I "build" the project. So, how can I generate the class file again? Thank you in advance for any help. Thomas Jung

HTML5 Canvas blinking on drawing

牧云@^-^@ 提交于 2019-12-01 18:00:35
问题 I'm beginning with an isometric game, and my canvas is blinking(Not in IE) when draws all the parts of the ground. When I set fps to 20 or less, the blinking stops. How can I solve that? Any ideas? var camerax = 300, cameray = 100; var fps = 60; function draw() { clearCanvas(); drawGround(); } function drawGround() { var img = new Image(); img.onload = function() { var width = img.width; var height = img.height; for (var x = 0; x < 3; x++) { for (var y = 3; y >= 0; y--) { mx = (x-y)*height +

How to refresh an already opened web page

风格不统一 提交于 2019-12-01 16:35:08
I just want to refresh an already opened web page with Selenium . It always opens a new browser window. What I'm doing wrong? from selenium import webdriver import urllib import urllib2 driver = webdriver.Firefox() driver.refresh() I would suggest binding the driver element search to the tag body and use the refresh command of the browser. In OSX for example driver.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 'r') Documentation on keys here: http://selenium-python.readthedocs.org/en/latest/api.html Update: The following code, very similar to your one, works fine for me. driver =

Asp.NET MVC Html.TextBox refresh problem

帅比萌擦擦* 提交于 2019-12-01 16:00:21
i have a problem with asp.net mvc 2 and the html.textboxfor helper. i use the follow code in a form: <%= Html.TextBoxFor(model => model.Zip, new { @class = "txt", id = "zip", tabindex = 1 })%> when the user send the form, i validate the zipcode, when the zip is invalid we set the corrected zip. my model has the corrected zip, the generated html code from asp contains the old zip value. sample: user write zip: 12345 my validation class, corrected teh zip to: 12346 my model contains the new zip: 123456, on the gui i see only 12345 what is the problem? You cannot modify the values in your

AJAX Div Retrieval every 60 seconds

纵饮孤独 提交于 2019-12-01 14:52:15
What I would like to do is retrieve the contents of a PHP file and insert it into a div every 60 seconds, basically refreshing the dynamic div. I've come up with the following code so far, however it doesn't seem to be working. The code is just like this, nothing extra, apart from the MYSQL login. PHP to grab: <?php $time = date("m/d/Y h:i:s a", time()); mysql_query("UPDATE djs SET requesttime='{$time}' WHERE username='{$djs['username']}'") or die(mysql_error()); $request_db = mysql_query("SELECT * FROM requests WHERE haveplayed='0'") or die(mysql_error()); echo "<table style=\"border:1px

PHP email form sends email everytime page is refreshed

一世执手 提交于 2019-12-01 14:44:57
my php email for is sending emails every time the page is refreshed. For example the user is filling out the form and sending it with the send button. That's all fine and good but if they refresh the page it sends the email again with all the same form info. I believe this is the problem code but don't know what it is. require_once('class.phpmailer.php'); if(isset($_POST['submit'])){ $name = $_POST['name']; $subject = 'WebForm'; $email = $_POST['email']; $body = $_POST['message']; $mail = new PHPMailer; // $mail->SMTPDebug = 2; // print_r($_POST); $mail->IsSMTP(); $mail->SMTPAuth = true; $mail