page-refresh

Rails: Using remote: true to stop page refresh

谁说胖子不能爱 提交于 2019-12-08 07:37:05
问题 I have a projects/show.html.erb page. A project has_many project_messages and from the projects/show.html.erb page, a user can create a new project_message successfully, however, when the new project_message is created through a _form partial, the page refreshes. I want to use :remote => true to add project_messages to the project without having to refresh the page. Please see the code I used below. This does not work and the page still refreshes. I am new to rails so any help would be

auto refresh jsp page when data changes

ε祈祈猫儿з 提交于 2019-12-08 05:26:34
问题 I have a JSP page which shows items included in an Array (Just a very simple list). In the background the Array might change i.e. adds a new Item or remove one. How can I auto refresh the page when the Array changes? 回答1: There are 2 ways that are most popular to perform such operation pool a method that would send 1 or 0 to see if you refresh the page or not keep asking for that data array and populate it through javascript Option 1 create a .jsp page and call it, for example, updateList.jsp

How can I prevent page refresh on click of <h:commandLInk>

大城市里の小女人 提交于 2019-12-08 02:18:37
问题 I am trying to prevent a page refresh when the user clicks on <h:commandLink> in my applicaton. I tried this but it does not work: Updated : <h:dataTable value="#{person.IssueList}" var="p" > <h:column style="width: 20px"> <f:facet name="header">Issue</f:facet> <h:commandLink value="#{p.IssueDesc}"/> </h:column> <h:column style="width: 20px"> <f:facet name="header">Reporting Date</f:facet> <p:calendar value="#{p.issuerepDt}" rendered="#{p.editable}" id="CalendarId"/> <h:outputText value="#{p

Django refresh page if change data by other user

隐身守侯 提交于 2019-12-08 02:03:17
问题 I have a test django app. In one page the test show the same question to all users. I'd like that when a user answers correctly, send a signal to other active user's browser to refresh to the next question. I have been learning about signals in django I learning work with them but I don't now how send the "refresh signal" to client browser. I think that it can do with a javascript code that check if a certain value (actual question) change and if change reload the page but I don't know this

Python selenium refresh if wait more than 10s

我与影子孤独终老i 提交于 2019-12-07 23:16:56
问题 from selenium import webdriver driver=webdriver.Firefox() driver.get(url) Sometimes the webdriver is stuck on a file or response and the page is never full-loaded so the line driver.get(url) is never finished. But I already got enough source code to run the rest of my code. I am wondering how can I bypass or refresh the page if the page is not full-loaded in 10 seconds. I have tried from selenium import webdriver from selenium.common.exceptions import TimeoutException driver=webdriver.Firefox

Keep the same colour after page refresh

家住魔仙堡 提交于 2019-12-07 14:06:49
问题 When I click the div , the color of the span changes to red , as i expected, but when I refresh my page the color isn't red , it returns back to original color, in my case green . How can I preserve the same color (red) after refreshing the page? I event tried with .apend() but the situation is the same. This is my HTML: <span>Green</span> <div id="changeColor"> </div> jQuery: $('#changeColor').click(function(){ $('span').css({"background-color":"red"}); }); Thank you all :D 回答1: Take a look

Refreshing a wicket Panel in browser refresh

牧云@^-^@ 提交于 2019-12-06 13:05:22
Im working on a pay-role system, and once the user refreshes the browser i need to refresh the statistics available in that page (the stats should be taken from the DB and display). But right now it doesn't work properly, cos in page refresh the java code doesn't get invoked but loads the cached page with the previous data. I tried fixing it adding the below code but it didn't work as well. @Override protected void setHeaders(WebResponse response) { response.setHeader("Cache-Control", "no-cache, max-age=0,must-revalidate, no-store"); } Anyone knows the fix for this? Thanks! This was the

socket.io “connect” event on refresh/reload wont fire

孤街浪徒 提交于 2019-12-06 11:04:39
问题 Having an issue with socket.io today. When I refresh a page .on("connect", {}) never fires. When I load a page from the url all events fire as they should. As you can see below I set the gameStatus to broken. After a series of client/server communications the game status should update to "ready" and a new player should be created on the server. When I reload the page (cmd+r), none of the client side events fire. The server side recognizes the new connection "sees" the new socket.id and emits

How can I prevent page refresh on click of <h:commandLInk>

老子叫甜甜 提交于 2019-12-06 07:19:49
I am trying to prevent a page refresh when the user clicks on <h:commandLink> in my applicaton. I tried this but it does not work: Updated : <h:dataTable value="#{person.IssueList}" var="p" > <h:column style="width: 20px"> <f:facet name="header">Issue</f:facet> <h:commandLink value="#{p.IssueDesc}"/> </h:column> <h:column style="width: 20px"> <f:facet name="header">Reporting Date</f:facet> <p:calendar value="#{p.issuerepDt}" rendered="#{p.editable}" id="CalendarId"/> <h:outputText value="#{p.issuerepDt}" rendered="#{not p.editable}" /> </h:column> <h:column> <f:facet name="header">Action</f

How to prevent reloading of a page after clicking on a hyperlink but redirect to that page and work out the necessary code written over there?

三世轮回 提交于 2019-12-06 07:16:10
My question may sound confusing but actually it's not. Let me clear you the things. The scenario is I've following HTML code: /*This is the hyperlink I've given for example here. Many such hyperlinks may present on a webpage representing different question ids' */ <a delhref="http://localhost/eprime/entprm/web/control/modules/questions/manage_question_issue.php?op=fixed&question_id=21679" title="Fixed" href="#fixedPopContent" class="fixed" data-q_id="21679" id="fix_21679">Fixed</a> /*Following is the HTML code for jQuery Colorbox pop-up. This code has kept hidden initially.*/ <div class=