Search Results

Search found 40672 results on 1627 pages for 'partial page refresh'.

Page 18/1627 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Master Page and Jquery Problem?

    - by user356787
    Hi all.. I have a page called AddNews.aspx and in codebehind a web method called AddNews(Parameters).. AddNews.aspx page is inherited from a master page.. So i used contentplaceholder. I have a button..It's id is btnSave. Here is jquery code: $(function() { $("[id$='_btnSave']").click(function() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", data: $.toJSON(veriler), url: "AddNews.aspx/AddNews", dataType: "json", success: function(result) { $("#result").html('News added'); } , error: function() { alert('Problem'); } }); }); }); </script> Button click dont trigger.. What can i do? Thanks.

    Read the article

  • JQuery Validation Plugin not working when used on page that includes another page via AJAX

    - by droidy
    We have a long page that contains a bunch of different form elements. One part of the form is called remotely via AJAX and is populated in an empty div. This is the part which JQuery Validation plugin is not working correctly on. We have class="required" on the elements on this page, but they do not show up as required. I'm guessing it's because the Validation plugin is looking for class="required" on our main page, and since the content from the AJAX page is put into the empty div behind the scenes, it's not detected the required fields. Any help is greatly appreciated.

    Read the article

  • PHP save a page then redirect to previous page(ajax)

    - by Shiro
    Dear all, I would like to ask for how to redirect to previous page (ajax paging). Example, Let's say currently I am in page 5, then I click on one record, after I edit it, I would like to go back to that page 5 not page 1. The problem is my paging is using ajax, http://domain/photo/#5 I try to use $_SERVER[http_referer], but I only get http://domain/photo , I not able to get # and the value. What is the best way to redirect back to the previous paging. My last choice is using $_SESSION. Hope I can get better answer here. Thx.

    Read the article

  • Check through Javascript that page is loading something

    - by Lilitu88
    When the browser is loading something on a page you can see it in the status bar that it says "Waiting for..." or "Transfering..." etc. In firebug you can check in the net tab when something is being loaded and see when it stops. That is what I want. Is there a way for me to trigger an event when that happens ? Or to get the status of the page or something ? Any way for me to know when that changes ? I know I can do this easier if I use Ajax, but I can't since the page it's expecting an Excel report. Thanks

    Read the article

  • Pull DIV from separate page and update DIV in current page

    - by brhea
    Hi everyone, I've got a simple one but haven't been able to find an example of a solution that fits exactly what I'm asking. Sorry in advance if this is a repeat. From my navigation menu, I want each link to reference a specific DIV in a separate page and then pull that DIV and replace the content in the current page. <ul> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> ..and so on </ul> Elsewhere in the page: <div id="displayContent">Content refreshes onClick. Previous content fades out, fresh content fades in.</div> Separate page (content.php): <div id="about">About content</div> <div id="contact">Contact content</div>

    Read the article

  • ASP MVC html helpers in partial views

    - by Rabbi
    I am still trying to figure out how to create reusable partial views in MVC Lets say I would like to create a partial view to display a form for submitting an address. Then in my ViewModel I have two addresses (Home address & Work Address) So I would think that in my view I call HTML.Partial for each one like this @Html.Partial("Address", Model.HomeAddress) @Html.Partial("Address", Model.WorkAddress) but what happens is instead of the fields having names like HomeAddress.Street, HomeAddress.City etc. they just have the regular field names Street, City, etc. so the binder on the HTTPPost action has no idea what to do with them Thanks in advance

    Read the article

  • master page control on content page

    - by kawade
    I have got the following code on master page: <u1> ............... ............ ............. </u1> <ul> <li id="link1" runat="server"><a href="mytestfile.aspx">Test Files</a></li> <li id="link2" runat="server"><a href="mylistitemtest.aspx">List Item Test</a></li> <li id="link3" runat="server"><a href="Mytest2.aspx">Some Test</a></li> </ul> I am trying to access the link1 on the content page as: var pageHandler = HttpContext.Current.CurrentHandler; if (pageHandler is System.Web.UI.Page) { ((System.Web.UI.Page)pageHandler).Master.FindControl("nav_link1").Visible = false; } but i am getting the error as: "Object reference not set to instance of an object"

    Read the article

  • Microsoft ReportViewer SetParameters continuous refresh issue

    - by Ilya Verbitskiy
    Originally posted on: http://geekswithblogs.net/ilich/archive/2013/10/16/microsoft-reportviewer-setparameters-continuous-refresh-issue.aspxI am a big fun of using ASP.NET MVC for building web-applications. It allows us to create simple, robust and testable solutions. However, .NET world is not perfect. There is tons of code written in ASP.NET web-forms. You cannot simply ignore it, even if you want to. Sometimes ASP.NET web-forms controls bring us non-obvious issues. The good example is Microsoft ReportViewer control. I have an example for you. 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 2: <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> 3:   4: <!DOCTYPE html> 5:   6: <html xmlns="http://www.w3.org/1999/xhtml"> 7: <head runat="server"> 8: <title>Report Viewer Continiuse Resfresh Issue Example</title> 9: </head> 10: <body> 11: <form id="form1" runat="server"> 12: <div> 13: <asp:ScriptManager runat="server"></asp:ScriptManager> 14: <rsweb:ReportViewer ID="_reportViewer" runat="server" Width="100%" Height="100%"></rsweb:ReportViewer> 15: </div> 16: </form> 17: </body> 18: </html>   The back-end code is simple as well. I want to show a report with some parameters to a user. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: _reportViewer.ProcessingMode = ProcessingMode.Remote; 4: _reportViewer.ShowParameterPrompts = false; 5:   6: var serverReport = _reportViewer.ServerReport; 7: serverReport.ReportServerUrl = new Uri("http://localhost/ReportServer_SQLEXPRESS"); 8: serverReport.ReportPath = "/Reports/TestReport"; 9:   10: var reportParameter1 = new ReportParameter("Parameter1"); 11: reportParameter1.Values.Add("Hello World!"); 12:   13: var reportParameter2 = new ReportParameter("Parameter2"); 14: reportParameter2.Values.Add("10/16/2013"); 15:   16: var reportParameter3 = new ReportParameter("Parameter3"); 17: reportParameter3.Values.Add("10"); 18:   19: serverReport.SetParameters(new[] { reportParameter1, reportParameter2, reportParameter3 }); 20: }   I set ShowParametersPrompts to false because I do not want user to refine the search. It looks good until you run the report. The report will refresh itself all the time. The problem caused by ServerReport.SetParameters method in Page_Load. The method cause ReportViewer control to execute the report on the NEXT post back. That is why the page has continuous post-backs. The fix is very simple: do nothing if Page_Load method executed during post-back. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: if (IsPostBack) 4: { 5: return; 6: } 7:   8: _reportViewer.ProcessingMode = ProcessingMode.Remote; 9: _reportViewer.ShowParameterPrompts = false; 10:   11: var serverReport = _reportViewer.ServerReport; 12: serverReport.ReportServerUrl = new Uri("http://localhost/ReportServer_SQLEXPRESS"); 13: serverReport.ReportPath = "/Reports/TestReport"; 14:   15: var reportParameter1 = new ReportParameter("Parameter1"); 16: reportParameter1.Values.Add("Hello World!"); 17:   18: var reportParameter2 = new ReportParameter("Parameter2"); 19: reportParameter2.Values.Add("10/16/2013"); 20:   21: var reportParameter3 = new ReportParameter("Parameter3"); 22: reportParameter3.Values.Add("10"); 23:   24: serverReport.SetParameters(new[] { reportParameter1, reportParameter2, reportParameter3 }); 25: } You can download sample code from GitHub - https://github.com/ilich/Examples/tree/master/ReportViewerContinuousRefresh

    Read the article

  • seam page parameters not working as expected.

    - by rangalo
    Hi, I am learning seam and following a very famous book Seam In Action by Dan Allen. This is an example from this book. Seam 2.2.0.GA JBoss 5.1.0.GA Here the page parameter roundId is always null even after a round is serialized, it is never passed. Neither to Roud.xhtml nor to RoundEdit.xhtml after clicking save on RoundEdit.xhtml. The entity always stays unmanaged. RoundEdit.page.xml <?xml version="1.0" encoding="UTF-8"?> <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd" login-required="true"> <begin-conversation join="true" /> <param name="roundId" value="#{roundHome.id}" converterId="javax.faces.Long"/> <param name="teeSetId" value="#{teeSetHome.teeSetId}" /> <param name="roundFrom" /> <action execute="#{roundHome.wire}" /> <navigation from-action="#{roundHome.persist}"> <rule if-outcome="persisted"> <end-conversation/> <redirect view-id="#{null != roundFrom ? roundFrom : '/Round.xhtml'}" /> </rule> </navigation> </page> RoundEdit.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <h:form id="roundform"> <rich:panel> <f:facet name="header>"> #{roundHome.managed ? 'Edit' : 'Add' } Round </f:facet> <s:decorate id="dateField" template="layout/edit.xhtml"> <ui:define name="label">Date:</ui:define> <rich:calendar id="date" datePattern="dd/MM/yyyy" value="#{round.date}"/> </s:decorate> <s:decorate id="notesField" template="layout/edit.xhtml"> <ui:define name="label">Notes:</ui:define> <h:inputTextarea id="notes" cols="80" rows="3" value="#{round.notes}" /> </s:decorate> <s:decorate id="totalScoreField" template="layout/edit.xhtml"> <ui:define name="label">Total Score:</ui:define> <h:inputText id="totalScore" value="#{round.totalScore}" /> </s:decorate> <s:decorate id="weatherField" template="layout/edit.xhtml"> <ui:define name="label">Weather:</ui:define> <h:selectOneMenu id="weather" value="#{round.weather}"> <s:selectItems var="_weather" value="#{weatherCategories}" label="#{_weather.label}" noSelectionLabel=" Select " /> <s:convertEnum/> </h:selectOneMenu> </s:decorate> <h:messages/> <div style="clear: both;"> <span class="required">*</span> required fields </div> </rich:panel> <div class="actionButtons"> <h:commandButton id="save" value="Save" action="#{roundHome.persist}" rendered="#{!roundHome.managed}" disabled="#{!roundHome.wired}" /> <h:commandButton id="update" value="Update" action="#{roundHome.update}" rendered="#{roundHome.managed}" /> <h:commandButton id="delete" value="Delete" action="#{roundHome.remove}" rendered="#{roundHome.managed}" /> <s:button id="discard" value="Discard changes" propagation="end" view="/Round.xhtml" rendered="#{roundHome.managed}" /> <s:button id="cancel" value="Cancel" propagation="end" view="/#{empty roundFrom ? 'RoundList' : roundFrom}.xhtml" rendered="#{!roundHome.managed}" /> </div> <rich:tabPanel> <rich:tab label="Tee Set"> <div class="association"> <h:outputText value="Tee set not selected" rendered="#{round.teeSet == null}" /> <rich:dataTable var="_teeSet" value="#{round.teeSet}" rendered="#{round.teeSet != null}"> <h:column> <f:facet name="header">Course</f:facet>#{_teeSet.course.name} </h:column> <h:column> <f:facet name="header">Color</f:facet>#{_teeSet.color} </h:column> <h:column> <f:facet name="header">Position</f:facet>#{_teeSet.pos} </h:column> </rich:dataTable> </div> </rich:tab> </rich:tabPanel> </h:form> </ui:define> </ui:composition> Round.page.xml <?xml version="1.0" encoding="UTF-8"?> <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"> <param name="roundId" value="#{roundHome.id}" converterId="javax.faces.Long"/> </page> Round.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <h:form id="roundform"> <rich:panel> <f:facet name="header>">Round</f:facet> <s:decorate id="id" template="layout/display.xhtml"> <ui:define name="label">Id:</ui:define> <h:outputText value="#{null == roundHome.id ? 'null' : roundHome.id}"> <s:convertDateTime type="date" /> </h:outputText> </s:decorate> <s:decorate id="date" template="layout/display.xhtml"> <ui:define name="label">Date:</ui:define> <h:outputText value="#{roundHome.instance.date}"> <s:convertDateTime type="date" /> </h:outputText> </s:decorate> <s:decorate id="golfer" template="layout/display.xhtml"> <ui:define name="label">Golfer:</ui:define> #{roundHome.instance.golfer.name} </s:decorate> <s:decorate id="totalScore" template="layout/display.xhtml"> <ui:define name="label">Total Score:</ui:define> #{roundHome.instance.totalScore} </s:decorate> <s:decorate id="weather" template="layout/display.xhtml"> <ui:define name="label">Weather:</ui:define> #{roundHome.instance.weather} </s:decorate> <s:decorate id="notes" template="layout/display.xhtml"> <ui:define name="label">Notes:</ui:define> #{roundHome.instance.notes} </s:decorate> <div style="clear:both"/> </rich:panel> <div class="actionButtons"> <s:button id="edit" view="/RoundEdit.xhtml" value="Edit" /> </div> <rich:tabPanel> <rich:tab label="Tee Set"> <div class="association"> <h:outputText value="Tee set not selected" rendered="#{roundHome.instance.teeSet == null}" /> <rich:dataTable var="_teeSet" value="#{roundHome.instance.teeSet}" rendered="#{roundHome.instance.teeSet != null}"> <h:column> <f:facet name="header">Course</f:facet>#{_teeSet.course.name} </h:column> <h:column> <f:facet name="header">Color</f:facet>#{_teeSet.color} </h:column> <h:column> <f:facet name="header">Position</f:facet>#{_teeSet.pos} </h:column> </rich:dataTable> </div> </rich:tab> </rich:tabPanel> </h:form> </ui:define> </ui:composition> The entityHome RoundHome.java @Name("roundHome") public class RoundHome extends EntityHome<Round>{ @In(required = false) private Golfer currentGolfer; @In(create = true) private TeeSetHome teeSetHome; @Logger private Log logger; public void wire() { logger.info("wire called"); TeeSet teeSet = teeSetHome.getDefinedInstance(); if (null != teeSet) { getInstance().setTeeSet(teeSet); logger.info("Successfully wired the teeSet instance with color: " + teeSet.getColor()); } } public boolean isWired() { logger.info("is wired called"); if(null == getInstance().getTeeSet()) { logger.info("wired teeSet instance is null, the button will be disabled !"); return false; } else { logger.info("wired teeSet instance is NOT null, the button will be enabled !"); logger.info("teeSet color: "+getInstance().getTeeSet().getColor()); return true; } } @RequestParameter public void setRoundId(Long id) { logger.info("in Setter RoundId is: " + id); super.setId(id); } public Long getRoundId() { Long id = (Long) getId(); logger.info("Setting RoundId : " + id); return id; } @Override protected Round createInstance() { Round round = super.createInstance(); round.setGolfer(currentGolfer); round.setDate(new java.sql.Date(System.currentTimeMillis())); logger.info("Created a Round with roundId: " + round.getId()); return round; } @Override protected Round loadInstance() { logger.info("loadInstance for id: " + getId()); return (Round) getEntityManager().createQuery( "select r from Round r " + "join fetch r.golfer g " + "join fetch r.teeSet ts " + "join fetch ts.course c " + "where r.id = :id ") .setParameter("id",getId()) .getSingleResult(); } }

    Read the article

  • How to force a page refresh or reload in jQuery?

    - by TimMac
    The code below displays a google map and search results when you enter an address and hit the submit button. I've been playing with it to try and force the page to completely refresh or reload once you hit the submit button. But I can't get it to work right. It loads the results "in page," but I'd like the page to completely refresh when the results load, like when you hit the back button on your browser. Hope that makes sense. I think the answer lies in this line of code but I don't know jquery very well. It's near the bottom of the full code below. <script type="text/javascript"> (function($) { $(document).ready(function() { load();'; Here's the full code below. Any help would be greatly appreciated! <?php /* SimpleMap Plugin display-map.php: Displays the Google Map and search results */ $to_display = ''; if ($options['display_search'] == 'show') { $to_display .= ' <div id="map_search" style="width: '.$options['map_width'].';"> <a name="map_top"></a> <form onsubmit="searchLocations(\''.$categories.'\'); return false;" name="searchForm" id="searchForm" action="http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].'"> <input type="text" id="addressInput" name="addressInput" class="address" />&nbsp; <select name="radiusSelect" id="radiusSelect">'; $default_radius = $options['default_radius']; unset($selected_radius); $selected_radius[$default_radius] = ' selected="selected"'; foreach ($search_radii as $value) { $r = (int)$value; $to_display .= '<option valu e="'.$value.'"'.$selected_radius[$r].'>'.$value.' '.$options['units']."</option>\n"; } $to_display .= ' </select>&nbsp; <input type="submit" value="'.__('Search', 'SimpleMap').'" id="addressSubmit" class="submit" /> <p>'.__('Please enter an address or search term in the box above.', 'SimpleMap').'</p> </form> </div>'; } if ($options['powered_by'] == 'show') { $to_display .= '<div id="powered_by_simplemap">'.sprintf(__('Powered by %s SimpleMap', 'SimpleMap'),'<a href="http://simplemap-plugin.com/" target="_blank">').'</a></div>'; } $to_display .= ' <div id="map" style="width: '.$options['map_width'].'; height: '.$options['map_height'].';"></div> <div id="results" style="width: '.$options['map_width'].';"></div> <script type="text/javascript"> (function($) { $(document).ready(function() { load();'; if ($options['autoload'] == 'some') { $to_display .= 'var autoLatLng = new GLatLng(default_lat, default_lng); searchLocationsNear(autoLatLng, autoLatLng.lat() + ", " + autoLatLng.lng(), "auto", "'.$options['lock_default_location'].'", "'.$categories.'");'; } else if ($options['autoload'] == 'all') { $to_display .= 'var autoLatLng = new GLatLng(default_lat, default_lng); searchLocationsNear(autoLatLng, autoLatLng.lat() + ", " + autoLatLng.lng(), "auto_all", "'.$options['lock_default_location'].'", "'.$categories.'");'; } $to_display .= ' }); })(jQuery); </script>'; ?>

    Read the article

  • how create a Controller partial class to override OnAuthorization?

    - by kaijk
    I'm trying to change the method OnAuthorization, so that it is available for any application ... this way: public partial class Controller { protected override void OnAuthorization(AuthorizationContext filterContext) { if ((string)(filterContext.RouteData.Values["action"]) == "test") { filterContext.Result = new HttpUnauthorizedResult(); } } } but is showing the compilation error: ...Controller.OnAuthorization(System.Web.Mvc.AuthorizationContext)': no suitable method found to override can someone help me?

    Read the article

  • Web page width on LG mobile phone

    - by steve
    Hi I'm trying to develop a site for mobile phones. At the moment it seems to work on iphone and android htc desire and an n95. When I try it on an LG renoir instead of the page fitting the width of the screen the page displays at least twice as wide as it should meaning you can scroll left and right. Has anyone come across this before, or knows how to stop it. Warm regards

    Read the article

  • How to save a picture from a partial trust XBAP app?

    - by Yacoder
    I have an XBAP app, which shows some pictures, and my users would like to save some of them to disk. But my XBAP app runs in the partial trust mode, so it can't initiate SaveFileDialog, not to mention it can't access the File System. What's would be the Stack Overflow recommended way to save a pic to disk in this case?

    Read the article

  • CSS Page Layout w/ Breaks

    - by stevenheidel
    I'm trying to make a webpage where it basically looks like a word document. There would be multiple boxes that would scroll down and the text would flow and page break from one page to the next. Does anyone have any idea where I would even start? Thanks.

    Read the article

  • AJAX Partial Rendering issues for the default page in IIS 7 when using custom http module

    - by WiseGuyEh
    The problem When I try to make a AJAX partial update request (using the UpdatePanel control) from the default page of an IIS7 web site, it fails- instead of returning the html to be updated, it returns the entire page, which then causes the MS AJAX Javascript to throw a parsing shit-fit. The suspected cause I have narrowed the cause down to two issues- making an AJAX request to the default page when I have a certain custom http module registered. A partial rendering request to http://localhost will fail, but a partial rendering request to http://localhost/default.aspx will work fine. Also, If i remove the following line in my custom HttpModule: _application.PreRequestHandlerExecute += OnPreRequestHandlerExecute; The AJAX partial render will work correctly. Wierd huh? Another wierd thing... If I look at trace.axd, I can see that when a partial rendering request fails, two POST requests are logged for the one partial rendering request- one where the default.aspx page executes successfully (trace information such as page_load is logged) but no content is produced and a second that doesn't seem to actually execute (no trace information is logged) but produces content (HTTP_CONTENT_LENGTH is greater than 0). Please help! If anyone with a good knowledge of HTTP modules or the MS AJAX Http module could explain why this is occuring I would be very grateful. As it is, the obvious work arround is to just redirect to default.aspx if the request url is "/" but I would really like to understand why this is occurring.

    Read the article

  • Partial Classes - are they bad design?

    - by dferraro
    Hello, I'm wondering why the 'partial class' concept even exists in .NET. I'm working on an application and we are reading a (actually very good) book relavant to the development platform we are implementing at work. In the book he provides a large code base /wrapper around the platform API and explains how he developed it as he teaches different topics about the platform development. Anyway, long story short - he uses partial classes, all over the place, as a way to fake multiple inheritence in C# (IMO). Why he didnt just split the classes up into multiple ones and use composition is beyond me. He will have 3 'partial class' files to make up his base class, each w/ 3-500 lines of code... And does this several times in his API. Do you find this justifiable? If it were me, I'd have followed the S.R.P. and created multiple classes to handle different required behaviors, then create a base class that has instances of these classes as members (e.g. composition). Why did MS even put partial class into the framework?? They removed the ability to expand/collapse all code at each scope level in C# (this was allowed in C++) because it was obviously just allowing bad habits - partial class is IMO the same thing. I guess my quetion is: Can you explain to me when there would be a legitimate reason to ever use a partial class? I do not mean this to be a rant / war thread. I'm honeslty looking to learn something here. Thanks

    Read the article

  • How do you do a foursquare style uitableview refresh?

    - by nickthedude
    If you haven't seen their implementation Of the refresh of a tableview it is extremely slick. I was surprised to see no search results asking for this to be explained so I figured ask it myself. If you haven't seen it, it basically adds a subviews to the uitableview above the header to the blank part of the screen when you pull a uitableview view down farther than it has data to display. Sorry if that doesn't make sense but just download the app and you will immediately want to do it too. Just wondering how they did it?

    Read the article

  • onbeforeunload dilemma: iframe breaking vs. annoying message on refresh/back buttons click

    - by Tossapol
    I'm implementing a search service called SearchInsideOut. http://bit.ly/97SFyW This search service simply replaces web page results by full web pages (Yes, I used iframe). The problem I have to deal with is iframe-breaking pages. The promising solution I found is using onbeforeunload to let users decide whether to stay or leave my site. But this also creates another annoying behavior. When users click other links in my site, onbeforeunload will also be triggered. Fortunately, I could solve this case by placing window.onbeforeunload=null in the onclick event of those links of my site. Unfortunately, I have no idea how to detect external events like clicking "refresh/back" buttons. What should I do to solve this difficulty? All suggestions and comments are highly appreciated.

    Read the article

  • How can I refresh a page via jQuery and ensure that there's a connection?

    - by Steve
    Hi! I toyed around with .load() and .ajax(), but i didn't get to an end. Here's what I need: Everey minute the function shall check if it can load a certain page. if the connection succeeds, I want the page to be refreshed, if not, nothing shall happen, the script shall retry later. I'm using the jQueryTimers plugin. this is my code so far: //reload trigger $(document).everyTime('60s', 'pagerefresh', reloadPage, 0, true); //refresh function function reloadPage() { $.ajax({ url:'index-1.php', type:'HEAD', success: location.reload(true) }) } I have no idea how to tell jQ what I want. any hint appreciated.

    Read the article

  • Clear/ Reset Result Table of Search page in OAF

    - by PRajkumar
    Normally problem faced by developers after creating Search Page is how to Clear/ Reset Result Table when developer open search page first time or after search when developer redirecting back to same search page from any other page (say delete page or update page)   Add following Code in your Search page Controller where you have constructed your Query Region   import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean; ... public void processRequest(OAPageContext pageContext, OAWebBean webBean) {  super.processRequest(pageContext, webBean);  OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");   // Here QueryRN is your Query Region Name as shown in following snap shot  queryBean.clearSearchPersistenceCache(pageContext); }     Note – After add this code, no need to worry about state of Application Module (AM). This code will clean up result table automatically every time when you will open Search page first time and when you are redirecting back to search page. But still as per good coding standard while redirecting back to search page always keep AM state to FALSE

    Read the article

  • Calling Web Service Functions Asynchronously from a Web Page

    - by SGWellens
    Over on the Asp.Net forums where I moderate, a user had a problem calling a Web Service from a web page asynchronously. I tried his code on my machine and was able to reproduce the problem. I was able to solve his problem, but only after taking the long scenic route through some of the more perplexing nuances of Web Services and Proxies. Here is the fascinating story of that journey. Start with a simple Web Service     public class Service1 : System.Web.Services.WebService    {        [WebMethod]        public string HelloWorld()        {            // sleep 10 seconds            System.Threading.Thread.Sleep(10 * 1000);            return "Hello World";        }    } The 10 second delay is added to make calling an asynchronous function more apparent. If you don't call the function asynchronously, it takes about 10 seconds for the page to be rendered back to the client. If the call is made from a Windows Forms application, the application freezes for about 10 seconds. Add the web service to a web site. Right-click the project and select "Add Web Reference…" Next, create a web page to call the Web Service. Note: An asp.net web page that calls an 'Async' method must have the Async property set to true in the page's header: <%@ Page Language="C#"          AutoEventWireup="true"          CodeFile="Default.aspx.cs"          Inherits="_Default"           Async='true'  %> Here is the code to create the Web Service proxy and connect the event handler. Shrewdly, we make the proxy object a member of the Page class so it remains instantiated between the various events. public partial class _Default : System.Web.UI.Page {    localhost.Service1 MyService;  // web service proxy     // ---- Page_Load ---------------------------------     protected void Page_Load(object sender, EventArgs e)    {        MyService = new localhost.Service1();        MyService.HelloWorldCompleted += EventHandler;          } Here is the code to invoke the web service and handle the event:     // ---- Async and EventHandler (delayed render) --------------------------     protected void ButtonHelloWorldAsync_Click(object sender, EventArgs e)    {        // blocks        ODS("Pre HelloWorldAsync...");        MyService.HelloWorldAsync();        ODS("Post HelloWorldAsync");    }    public void EventHandler(object sender, localhost.HelloWorldCompletedEventArgs e)    {        ODS("EventHandler");        ODS("    " + e.Result);    }     // ---- ODS ------------------------------------------------    //    // Helper function: Output Debug String     public static void ODS(string Msg)    {        String Out = String.Format("{0}  {1}", DateTime.Now.ToString("hh:mm:ss.ff"), Msg);        System.Diagnostics.Debug.WriteLine(Out);    } I added a utility function I use a lot: ODS (Output Debug String). Rather than include the library it is part of, I included it in the source file to keep this example simple. Fire up the project, open up a debug output window, press the button and we get this in the debug output window: 11:29:37.94 Pre HelloWorldAsync... 11:29:37.94 Post HelloWorldAsync 11:29:48.94 EventHandler 11:29:48.94 Hello World   Sweet. The asynchronous call was made and returned immediately. About 10 seconds later, the event handler fires and we get the result. Perfect….right? Not so fast cowboy. Watch the browser during the call: What the heck? The page is waiting for 10 seconds. Even though the asynchronous call returned immediately, Asp.Net is waiting for the event to fire before it renders the page. This is NOT what we wanted. I experimented with several techniques to work around this issue. Some may erroneously describe my behavior as 'hacking' but, since no ingesting of Twinkies was involved, I do not believe hacking is the appropriate term. If you examine the proxy that was automatically created, you will find a synchronous call to HelloWorld along with an additional set of methods to make asynchronous calls. I tried the other asynchronous method supplied in the proxy:     // ---- Begin and CallBack ----------------------------------     protected void ButtonBeginHelloWorld_Click(object sender, EventArgs e)    {        ODS("Pre BeginHelloWorld...");        MyService.BeginHelloWorld(AsyncCallback, null);        ODS("Post BeginHelloWorld");    }    public void AsyncCallback(IAsyncResult ar)    {        String Result = MyService.EndHelloWorld(ar);         ODS("AsyncCallback");        ODS("    " + Result);    } The BeginHelloWorld function in the proxy requires a callback function as a parameter. I tested it and the debug output window looked like this: 04:40:58.57 Pre BeginHelloWorld... 04:40:58.57 Post BeginHelloWorld 04:41:08.58 AsyncCallback 04:41:08.58 Hello World It works the same as before except for one critical difference: The page rendered immediately after the function call. I was worried the page object would be disposed after rendering the page but the system was smart enough to keep the page object in memory to handle the callback. Both techniques have a use: Delayed Render: Say you want to verify a credit card, look up shipping costs and confirm if an item is in stock. You could have three web service calls running in parallel and not render the page until all were finished. Nice. You can send information back to the client as part of the rendered page when all the services are finished. Immediate Render: Say you just want to start a service running and return to the client. You can do that too. However, the page gets sent to the client before the service has finished running so you will not be able to update parts of the page when the service finishes running. Summary: YourFunctionAsync() and an EventHandler will not render the page until the handler fires. BeginYourFunction() and a CallBack function will render the page as soon as possible. I found all this to be quite interesting and did a lot of searching and researching for documentation on this subject….but there isn't a lot out there. The biggest clues are the parameters that can be sent to the WSDL.exe program: http://msdn.microsoft.com/en-us/library/7h3ystb6(VS.100).aspx Two parameters are oldAsync and newAsync. OldAsync will create the Begin/End functions; newAsync will create the Async/Event functions. Caveat: I haven't tried this but it was stated in this article. I'll leave confirming this as an exercise for the student J. Included Code: I'm including the complete test project I created to verify the findings. The project was created with VS 2008 SP1. There is a solution file with 3 projects, the 3 projects are: Web Service Asp.Net Application Windows Forms Application To decide which program runs, you right-click a project and select "Set as Startup Project". I created and played with the Windows Forms application to see if it would reveal any secrets. I found that in the Windows Forms application, the generated proxy did NOT include the Begin/Callback functions. Those functions are only generated for Asp.Net pages. Probably for the reasons discussed earlier. Maybe those Microsoft boys and girls know what they are doing. I hope someone finds this useful. Steve Wellens

    Read the article

  • Refresh bounded taskflows across regions using InputParameters

    - by raghu.yadav
    Usecase1 : Selecting record from table in left region reflects dependent detail form of same table in right region using InputParameters Here is the example given by Andre Example Three important crux to be known from above example. 1) create primary key attribute in pagedef of the table in region1 2) add inputparameter name in taskflow inputparameters of region2 3) bind primary key attribute from page definition to above inputparameters in main page where above 2 regions dropped. UseCase2 : Selecting record from location table in left region reflects corresponding department records from department table in right regions. 1) create bind variable on location id in departmentVO. 2) create inputparameter say LocationParam, with type Number, value as #{pageFlowScope.LocationParam} 3) assign LocationId param from pagedef to LocationParam in taskflow2 4) create ExecuteWithParam action in region2 pagedef and invoke the same on IfRefresh condition. during run time - steps executes in backwards (3,2,1)..i,e as user selects column in location table, it assigns location from pagedef to locationParam and then to PageFlowScope and from there to view criteria.

    Read the article

  • Refresh bounded taskflows across regions using Contextual Events

    - by raghu.yadav
    Usecases: 1) Data Change in left region inputText field reflect changes in right region using contextual event. example by Frank Nimphius :Value change event refresh across regions using Contextual Events 2) Select Tree node in left region reflects dependent detail form in right region using dynamic regions and Contextual Events. example by Frank Nimphius:Example6-RangeCtx.unzip More related examples: http://thepeninsulasedge.com/frank_nimphius/2008/02/07/adf-faces-rc-refreshing-a-table-ui-from-a-contextual-event/ http://www.oracle.com/technology/products/jdev/tips/fnimphius/generictreeselectionlistener/index.html http://www.oracle.com/technology/products/jdev/tips/fnimphius/syncheditformwithtree/index.html http://biemond.blogspot.com/2009/01/passing-adf-events-between-task-flow.html http://www.oracle.com/technology/products/jdev/tips/fnimphius/opentaskflowintab/index.html http://lucbors.blogspot.com/2010/03/adf-11g-contextual-event-framework.html http://thepeninsulasedge.com/blog/?cat=2 http://www.ora600.be/news/adf-contextual-events-11g-r1-ps1

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >