Search Results

Search found 1381 results on 56 pages for 'reload'.

Page 50/56 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Jqgrid search option not working and edit popups not closed after submit

    - by Sajith
    i have facing two problem in Jqgrid. Search option not working and there is not closed editpopups after submit. my code below <table id="jQGridpending" style="width:auto"> </table> <div id="jQGridpendingPager"> </div> <table id="searchpending"></table> <div id="filterpending"></div> jQuery("#jQGridpending").jqGrid({ url: '@Url.Action("DiscountRequest", "Admin")', datatype: "json", mtype: "POST", colNames: [ "Id", "ClientName", "BpName", "Pdt", "DiscountReq", "DiscountAllowed", "Status", ], colModel: [ { name: "Id", width: 100, key: true, formatter: "integer", sorttype: "integer", hidden: true }, { name: "ClientName", width: 150, sortable: true,search:true,stype:'text', editrules: { required: false } }, { name: "BpName", width: 200, sortable: true, editable: false, editrules: { required: false } }, { name: "Pdt", width: 150, sortable: true, editable: false, editrules: { required: false } }, { name: "DiscountReq", width: 150, sortable: false, editable: false, editrules: { required: false } }, { name: "DiscountAllowed", width: 200, sortable: true, editable: true, editrules: { required: true } }, { name: 'Status', index: 'Status', width: 200, sortable: false, editable: true, formatter: 'select', edittype: 'select', editoptions: { value: "pending:pending;approved:approved;rejected:rejected" } }, @* { name: "Status", width: 200, sortable: false, editable: true, editrules: { required: true, minValue: 1, }, edittype: "select", editoptions: { async: false, dataUrl: "@Url.Action("GetStatus", "Admin")", buildSelect: function (response) { var s = "<select>"; s += '<option value="0">--Select--</option><option value="pending">pending</option>'; return s + "</select>"; } } },*@ //{ name: "Status", width: 150, sortable: true, editable: true, editrules: { required: true } }, //{ name: "Created", width: 120, formatter: "date", formatoptions: { srcformat: "ISO8601Long", newformat: "n/j/Y g:i:s A" }, align: "center", sorttype: "date" }, ], loadtext: "Processing pending request data please wait...", rowNum: 10, gridview: true, autoencode: true, loadonce: true, height: "auto", rownumbers: true, prmNames: { id: "Id" }, rowList: [10, 20, 30], pager: '#jQGridpendingPager', sortname: 'id', sortorder: "asc", viewrecords: true, jqModal: true, caption: "Pending List", reloadAfterSubmit: true, editurl: '@Url.Action("UpdateDiscount", "Admin")', }); jQuery("#jQGridpending").jqGrid('navGrid', '#jQGridpendingPager', { search: true,recreateFilter: true, add: false, searchtext: "Search", edittext: "Edit", deltext: "Delete", }, {//EDIT url: '@Url.Action("UpdateDiscount", "Admin")', width: "auto", jqModal: true, closeOnEscape: true, closeAfterEdit: true, reloadAfterSubmit: true, afterSubmit: function () { // Reload grid records after edit a entry in the db. $(this).jqGrid('setGridParam', { datatype: 'json' }); return [true, '', false]; }, }, {//DELETE url: '@Url.Action("DelDiscount", "Admin")', closeOnEscape: true }, {//SEARCH closeOnEscape: true, searchOnEnter: true, multipleSearch: true, //overlay: 0, width: "auto", height: "auto", });

    Read the article

  • iPhone Key-Value Observer: observer not registering in UITableViewController

    - by Scott
    Hi Fellow iPhone Developers, I am an experienced software engineer but new to the iPhone platform. I have successfully implemented sub-classed view controllers and can push and pop parent/child views on the view controller stack. However, I have struck trouble while trying to update a view controller when an object is edited in a child view controller. After much failed experimentation, I discovered the key-value observer API which looked like the perfect way to do this. I then registered an observer in my main/parent view controller, and in the observer I intend to reload the view. The idea is that when the object is edited in the child view controller, this will be fired. However, I think that the observer is not being registered, because I know that the value is being updated in the editing view controller (I can see it in the debugger), but the observing method is never being called. Please help! Code snippets follow below. Object being observed. I believe that this is key-value compliant as the value is set when called with the setvalue message (see Child View Controller below). X.h: @interface X : NSObject <NSCoding> { NSString *name; ... @property (nonatomic, retain) NSString *name; X.m: @implementation X @synthesize name; ... Main View Controller.h: @class X; @interface XViewController : UITableViewController { X *x; ... Main View Controller.m: @implementation XViewController @synthesize x; ... - (void)viewDidLoad { ... [self.x addObserver:self forKeyPath: @"name" options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:nil]; [super viewDidLoad]; } ... - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqual:@"name"]) { NSLog(@"Found change to X"); [self.tableView reloadData]; } [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } Child View Controller.m: (this correctly sets the value in the object in the child view controller) [self.x setValue:[[tempValues objectForKey:key] text] forKey:@"name"];

    Read the article

  • Facebook Connect 'next' error

    - by Mark
    I am trying to experiment with the new facebook authentication system, and I can't getthe login to work. I'm getting the following error message: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. The url that is being sent to facebook is: http://www.facebook.com/connect/uiserver.php?app_id=444444444444444&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&display=popup&channel=http%3A%2F%2Fwww.mysite.com%2Ffbtester.php&cancel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df6095a98598be8%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request Note that the 'Next' variable in the url is: next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx Any ideas what could be going wrong? All I've done is copy and paste the facebook login demo code from facebook's website: <?php define('FACEBOOK_APP_ID', 'your application id'); define('FACEBOOK_SECRET', 'your application secret'); function get_facebook_cookie($app_id, $application_secret) { $args = array(); parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args); ksort($args); $payload = ''; foreach ($args as $key => $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <body> <?php if ($cookie) { ?> Your user ID is <?= $cookie['uid'] ?> <?php } else { ?> <fb:login-button></fb:login-button> <?php } ?> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); </script> </body> </html> Thanks for the help!

    Read the article

  • Ajax comments form in ASP.NET MVC2, howto?

    - by Artiom Chilaru
    I've been playing around with different aspects of MVC for some time now, and I've reached a situation where I'm not sure what would be the best way to solve a problem. I'm hoping that the SO community will help me out here :P I've seen a number of examples of Ajax.BeginForm on the internet, and it seems like a very nifty idea. E.g. you have a dropdown where you select a customer - and on selecting one it will load this client's details in some placeholder on the page. This works perfectly fine. But what to do if you want to tie in some validation in the box? Just hypothetically, imagine an article page, and user comments in the bottom. Below the comments area there's an ajax-y "Add comment" box. When a user adds a comment, it will appear in the comments area, below the last comment there. If I set the Ajax.BeginForm to Append the result of the call to the Comments area, it will work fine. But what if the data posted is not valid? Instead of appending a "successful" comment to the comments area I have to show the user validation errors. At this point I decided that the area INSIDE the Ajax.BeginForm will be inside a partial, and the form's submits will return this partial. Validation works fine. On each submit we reload the contents inside the form element. But how to add the successful comment to the top? Other things to consider: The comment form also has a "Preview" button. When the user clicks on Preview, I should load the rendered comment into a preview box. This will probably be inside the form area as well. I was thinking of using Json results instead. When the user submits the form, the server code will generate a Json object with a Success value, and html rendered partials as some properties. Something like { "success": true, "form": "<html form data>", "comment": "successful comment html to inject into the page" } This would be a perfect solution, except there's no way in MVC to render a partial into a string, inside the controller (separation of context, remember?). So.. what should I do then? Any "correct" way to implement this? Anyone???

    Read the article

  • Using ASP.NET MVC, Linq To SQL, and StructureMap causing DataContext to cache data

    - by Dragn1821
    I'll start by telling my project setup: ASP.NET MVC 1.0 StructureMap 2.6.1 VB I've created a bootstrapper class shown here: Imports StructureMap Imports DCS.Data Imports DCS.Services Public Class BootStrapper Public Shared Sub ConfigureStructureMap() ObjectFactory.Initialize(AddressOf StructureMapRegistry) End Sub Private Shared Sub StructureMapRegistry(ByVal x As IInitializationExpression) x.AddRegistry(New MainRegistry()) x.AddRegistry(New DataRegistry()) x.AddRegistry(New ServiceRegistry()) x.Scan(AddressOf StructureMapScanner) End Sub Private Shared Sub StructureMapScanner(ByVal scanner As StructureMap.Graph.IAssemblyScanner) scanner.Assembly("DCS") scanner.Assembly("DCS.Data") scanner.Assembly("DCS.Services") scanner.WithDefaultConventions() End Sub End Class I've created a controller factory shown here: Imports System.Web.Mvc Imports StructureMap Public Class StructureMapControllerFactory Inherits DefaultControllerFactory Protected Overrides Function GetControllerInstance(ByVal controllerType As System.Type) As System.Web.Mvc.IController Return ObjectFactory.GetInstance(controllerType) End Function End Class I've modified the Global.asax.vb as shown here: ... Sub Application_Start() RegisterRoutes(RouteTable.Routes) 'StructureMap BootStrapper.ConfigureStructureMap() ControllerBuilder.Current.SetControllerFactory(New StructureMapControllerFactory()) End Sub ... I've added a Structure Map registry file to each of my three projects: DCS, DCS.Data, and DCS.Services. Here is the DCS.Data registry: Imports StructureMap.Configuration.DSL Public Class DataRegistry Inherits Registry Public Sub New() 'Data Connections. [For](Of DCSDataContext)() _ .HybridHttpOrThreadLocalScoped _ .Use(New DCSDataContext()) 'Repositories. [For](Of IShiftRepository)() _ .Use(Of ShiftRepository)() [For](Of IMachineRepository)() _ .Use(Of MachineRepository)() [For](Of IShiftSummaryRepository)() _ .Use(Of ShiftSummaryRepository)() [For](Of IOperatorRepository)() _ .Use(Of OperatorRepository)() [For](Of IShiftSummaryJobRepository)() _ .Use(Of ShiftSummaryJobRepository)() End Sub End Class Everything works great as far as loading the dependecies, but I'm having problems with the DCSDataContext class that was genereated by Linq2SQL Classes. I have a form that posts to a details page (/Summary/Details), which loads in some data from SQL. I then have a button that opens a dialog box in JQuery, which populates the dialog from a request to (/Operator/Modify). On the dialog box, the form has a combo box and an OK button that lets the user change the operator's name. Upon clicking OK, the form is posted to (/Operator/Modify) and sent through the service and repository layers of my program and updates the record in the database. Then, the RedirectToAction is called to send the user back to the details page (/Summary/Details) where there is a call to pull the data from SQL again, updating the details view. Everything works great, except the details view does not show the new operator that was selected. I can step through the code and see the DCSDataContext class being accessed to update the operator (which does actually change the database record), but when the DCSDataContext is accessed to reload the details objects, it pulls in the old value. I'm guessing that StructureMap is causing not only the DCSDataContext class but also the data to be cached? I have also tried adding the following to the Global.asax, but it just ends up crashing the program telling me the DCSDataContext has been disposed... Private Sub MvcApplication_EndRequest(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.EndRequest StructureMap.ObjectFactory.ReleaseAndDisposeAllHttpScopedObjects() End Sub Can someone please help?

    Read the article

  • dhtmlxgrid: getting an xml string of grid data

    - by user823527
    The dhtmlxgrid documentation is saying that I should be able to get a string with the grid data with the serialize feature. mygrid.setSerializationLevel(true,true); var myXmlStr = mygrid.serialize(); I'd like to use that feature to get the updated grid data. But I don't get the xml string. Is that feature not available in the open source version? If I could get a csv string, that would also be OK. But I don't get that either. var gridcsv=mygrid.serializeToCSV(); document.getElementById("mytextareax").value = gridcsv; The html information for the grid is: <a href="#" onclick="savegrid();">Save Grid</a> <textarea id="mytextareax"><rows><row id='r1'><cell>index ... </rows></textarea> <div id="mytextarea" style="width:400px; height: 400px;"> </div> <div id="gridbox" style="width:600px; height:270px; background-color:white;"></div> <a href='#alfa' onClick="ser()">Reload grid with another structure</a> <br> The script for creating the grid is: <script> mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("../../codebase/imgs/"); mygrid.loadXML("../common/grid500.xml"); function ser(){ mygrid.clearAll(true); mygrid.loadXML("../common/gridH3.xml"); } function savegrid(){ alert('save grid'); mygrid.setSerializationLevel(true,true); var myXmlStr = mygrid.serialize(); /* document.getElementById("mytextarea").innerHTML = myXmlStr; */ document.getElementById("mytextareax").value = myXmlStr; alert(myXmlStr); } </script> Is there any way to get the data out of the dhtmlx grid to be able to create my own xml file from it?

    Read the article

  • Global Entity Framework Context in WPF Application

    - by OffApps Cory
    Good day, I am in the middle of development of a WPF application that is using Entity Framework (.NET 3.5). It accesses the entities in several places throughout. I am worried about consistency throughout the application in regard to the entities. Should I be instancing separate contexts in my different views, or should I (and is a a good way to do this) instance a single context that can be accessed globally? For instance, my entity model has three sections, Shipments (with child packages and further child contents), Companies/Contacts (with child addresses and telephones), and disk specs. The Shipments and EditShipment views access the DiskSpecs, and the OptionsView manages the DiskSpecs (Create, Edit, Delete). If I edit a DiskSpec, I have to have something in the ShipmentsView to retrieve the latest specs if I have separate contexts right? If it is safe to have one overall context from which the rest of the app retrieves it's objects, then I imagine that is the way to go. If so, where would that instance be put? I am using VB.NET, but I can translate from C# pretty good. Any help would be appreciated. I just don't want one of those applications where the user has to hit reload a dozen times in different parts of the app to get the new data. Update: OK so I have changed my app as follows: All contexts are created in Using Blocks to dispose of them after they are no longer needed. When loaded, all entities are detatched from context before it is disposed. A new property in the MainViewModel (ContextUpdated) raises an event that all of the other ViewModels subscribe to which runs that ViewModels RefreshEntities method. After implementing this, I started getting errors saying that an entity can only be referenced by one ChangeTracker at a time. Since I could not figure out which context was still referencing the entity (shouldn't be any context right?) I cast the object as IEntityWithChangeTracker, and set SetChangeTracker to nothing (Null). This has let to the current problem: When I Null the changeTracker on the Entity, and then attach it to a context, it loses it's changed state and does not get updated to the database. However if I do not null the change tracker, I can't attach. I have my own change tracking code, so that is not a problem. My new question is, how are you supposed to do this. A good example Entity query and entity save code snipped would go a long way, cause I am beating my head in trying to get what I once thought was a simple transaction to work. Any help would elevate you to near god-hood.

    Read the article

  • WinForms Form won't close on pressing X or Close() in C#

    - by MadBoy
    I'm having a bit weird problem with WinForm which seems to refuse to close for some weird reason. I've got very simple gui which sometimes doesn't react for me pressing X or when i use events on buttons it even reaches Close() and does nothing.. private void buttonZapisz_Click(object sender, EventArgs e) { string plik = textBoxDokumentDoZaladowania.Text; if (File.Exists(plik)) { string extension = Path.GetExtension(plik); string nazwaPliku = Path.GetFileName(plik); SqlMethods.databaseFilePut(plik, comboBoxTypDokumentu.Text, textBoxKomentarz.Text, sKlienciID, sPortfelID, extension, nazwaPliku); Close(); } } There are no events assigned to FormClosed or FormClosing. So how can I find out what's wrong. Sometimes X will work after the GUI is loaded but after i press Button to save some stuff to database it reaches Close() in that button event and it still is visible and does nothing. Can't use X, nor ALT+F4. I can go around GUI and choose other values for ComboBox without problem. I call GUI like this: private void contextMenuDokumentyDodaj_Click(object sender, EventArgs e) { var lv = (ListView) contextMenuDokumenty.SourceControl; string varPortfelID = Locale.ustalDaneListViewKolumny(listViewNumeryUmow, 0); string varKlienciID = Locale.ustalDaneListViewKolumny(listViewKlienci, 0); if (lv == listViewDokumentyPerKlient) { if (varKlienciID != "") { var dokumenty = new DocumentsGui(varKlienciID); dokumenty.Show(); dokumenty.FormClosed += varDocumentsGuiKlienci_FormClosed; } } else if (lv == listViewDokumentyPerPortfel) { if (varPortfelID != "" && varKlienciID != "") { var dokumenty = new DocumentsGui(varKlienciID, varPortfelID); dokumenty.Show(); dokumenty.FormClosed += varDocumentsGuiPortfele_FormClosed; } } } While I can't close GUI i can work on the main gui without problem too. I can open up same GUI and after opening new GUI i can quickly close it. GUI is very simple with few ComboBoxes,TextBoxes and one EditButton from Devexpress. Edit: varDocumentsGuiPortfele_FormClosed code allows me to refresh GUI (reload ListView's depending on where the user is on now). private void varDocumentsGuiPortfele_FormClosed(object sender, FormClosedEventArgs e) { TabControl varTabControl = tabControlKlientPortfele; if (varTabControl.TabPages.IndexOf(tabPageDokumentyPerKlient) == varTabControl.SelectedIndex) { loadTabControlKlientPortfeleBezZmianyUmowy(); } }

    Read the article

  • Missing taglibrary in Netbeans Hibernate tutorial xhtml file?

    - by Christopher W. Allen-Poole
    I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I am getting the following error: "This page calls for XML namespace declared with prefix br but no taglibrary exists" Now, I have seen a similar question somewhere else: http://forums.sun.com/thread.jspa?threadID=5430327 but the answer is not listed there. Or, if it is, then I am clearly missing it -- line one of my index.xhtml file reads "http://www.w3.org/1999/xhtml". It also does not explain why, when I reload localhost:8080, the message disappears. Here is my index.xhtml file: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"> <ui:composition template="./template.xhtml"> <ui:define name="body"> <h:form> <h:commandLink action="#{filmController.previous}" value="Previous #{filmController.pageSize}" rendered="#{filmController.hasPreviousPage}"/> <h:commandLink action="#{filmController.next}" value="Next #{filmController.pageSize}" rendered="#{filmController.hasNextPage}"/> <h:dataTable value="#{filmController.filmTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px"> <h:column> <f:facet name="header"> <h:outputText value="Title"/> </f:facet> <h:outputText value="#{item.title}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Description"/> </f:facet> <h:outputText value="#{item.description}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value=" "/> </f:facet> <h:commandLink action="#{filmController.prepareView}" value="View"/> </h:column> </h:dataTable> <br/> </h:form> </ui:define> </ui:composition> </html>

    Read the article

  • CSS Background image arbitrarily not getting requested at all

    - by Pekka
    I`m in the process of building a template for Redmine (a project management system based on Ruby on Rails.) Ruby is running on a virtual server from a Bitnami.org installation package. The OS is Windows. The template essentially consists of a styles.css file. In that file, I have the following line: #header { padding: 0px; padding-top: 48px; background-color: #62DFFF; background-image: url(../images/bkg.jpg); background-position: center bottom; background-repeat: repeat-x; height:150px; } It's a header element with a background image. The problem: This background image arbitrarily appears and disappears when reloading the page. It is more often missing than it is not. Say you reload the page in your browser ten times in twenty seconds; the image will appear in two instances, and be missing in the 18 others. I would have put this down to server problems, but the weird thing is that when it's missing, the request for the image doesn't appear in Firebug's net tab at all. Even if it were cached, the request should be there, shouldn't it? Raw screenshots of the identical page on two reloads: I am 100% sure the CSS file does not change in between. I have examined both instances with Firebug and the CSS is identical. When I change the image's URL by editing the style declaration in firebug to bkg.jpg?xyz=123445 then the image will get loaded, which is making me think this must be a server problem. It happens in both Firefox and Chrome so it must be something basic I'm overlooking. What could be causing a browser not to load a resource at all? I have zero idea about Ruby nor Rails - getting Redmine running and customized is all I have ever had to do with this platform - so I don't really know where to start debugging. Apache's, Mongrel's and Redmine's error logs look fine, though. And then again, this looks like a browser issue. I'm stumped.

    Read the article

  • Junit (3.8.1) testing that an exception is thrown (works in unit test, fails when added to a testSui

    - by Mike Cargal
    I'm trying to test that I'm throwing an exception when appropriate. In my test class I have a method similar to the following: public void testParseException() { try { ClientEntitySingleton.getInstance(); fail("should have thrown exception."); } catch (RuntimeException re) { assertEquals( "<exception message>", re.getMessage()); } } This works fine (green bar) whenever I run that single unitTest class. However, when I add that test to a testSuite, I get a red bar Unit test failure reported on the exception. One more thing... it works in the testSuite, if it's the first test in the suite. Actually, I'm doing two of these tests and just figured out that if I make them the first two tests in the suite, all is good, but I get this failure if a "regular" test precedes it. So I have a work-around, but no real answer. Any ideas? Heres'a stack trace of the "failure" java.lang.RuntimeException: ProcEntity client dn="Xxxxxx/Xxxx/XXX" is defined multiple times. at com.someco.someprod.clientEntityManagement.ClientEntitySingleton.addClientEntity(ClientEntitySingleton.java:247) at com.someco.someprod.clientEntityManagement.ClientEntitySingleton.startElement(ClientEntitySingleton.java:264) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at com.someco.someprod.clientEntityManagement.ClientEntitySingleton.parse(ClientEntitySingleton.java:216) at com.someco.someprod.clientEntityManagement.ClientEntitySingleton.reload(ClientEntitySingleton.java:303) at com.someco.someprod.clientEntityManagement.ClientEntitySingleton.setInputSourceProvider(ClientEntitySingleton.java:88) at com.someco.someprod.clientEntityManagement.test.TestClientBase.setUp(TestClientBase.java:17) at com.someco.someprod.clientEntityManagement.test.TestClientEntityDup.setUp(TestClientEntityDup.java:8) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    Read the article

  • Can't setup Facebook Login on my website..

    - by Mark
    I am trying to experiment with the new facebook authentication system, and I can't getthe login to work. I'm getting the following error message: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. The url that is being sent to facebook is: http://www.facebook.com/connect/uiserver.php?app_id=444444444444444&next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&display=popup&channel=http%3A%2F%2Fwww.mysite.com%2Ffbtester.php&cancel=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df6095a98598be8%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request Note that the 'Next' variable in the url is: next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23%3F%3D%26cb%3Df357eceb0361a8a%26origin%3Dhttp%253A%252F%252Fwww.mysite.com%252Ff38fea4f9ea573%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23b800f8a78%26result%3DxxRESULTTOKENxx Any ideas what could be going wrong? All I've done is copy and paste the facebook login demo code from facebook's website: define('FACEBOOK_APP_ID', 'your application id'); define('FACEBOOK_SECRET', 'your application secret'); function get_facebook_cookie($app_id, $application_secret) { $args = array(); parse_str(trim($COOKIE['fbs' . $app_id], '\"'), $args); ksort($args); $payload = ''; foreach ($args as $key = $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ? Your user ID is <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); </script> Thanks for the help!

    Read the article

  • Loading external pngs into an AS2 swf that is loaded into an AS3 swf wrapper

    - by James Fassett
    I have a Wrapper SWF that loads a series of AS2 movies. Each AS2 movie loads a series of .png files. AS3_wrapper.swf |-> AS2_1.swf |-> image_1.png |-> image_2.png |-> AS2_2.swf |-> image_1.png |-> image_2.png Inside of the AS2 I listen for the load of the pngs using onLoadInit and update my UI. This works fine for the first AS2 swf. But when I load the second AS2 swf the onLoadInit isn't triggered for the pngs. My guess is that the images are in a cache or something like that. I put a random string on the end of the request to try and avoid the cache but that doesn't seem to work. The code in the as2 looks roughly like this: var flagLoader:MovieClipLoader = new MovieClipLoader(); var listener:Object = new Object(); listener.onLoadInit = Delegate.create(this, handleImageLoad); flagLoader.addListener(listener); var row:MovieClip = frame1["row" + (numLoaded + 1)]; flagLoader.loadClip(predictionData[numLoaded].flag + "?r="+Math.random(), row.flag); I'm making sure to load only one image at a time (I've read anecdotal evidence loading more than one thing at a time can confuse the MovieClipLoader). For the first as2 file everything works great. When I load the second as2 file the handleImageLoad never gets called. Update: Even more perplexing is if I reload the first AS2 movie (after the second AS2 movie fails to load the images) the first AS2 movie loads the images again fine. Update 2: After trying to change from using a MovieClipLoader to polling (as was helpfully suggested) I have found some more evidence that is relevant. When I load the first AS2 files and trace from the top level clip it prints out _root. The second AS2 file when loaded traces the same _root. This lead me to check if they were clashing on names and they are. Both have a child called frame. The first one, when I trace it comes out as _root.frame as expected. The second AS2 file traces _level0.instance3.instance118.instance111.frame. I'm guessing this is related to the problem. Flash is keeping the _root of the two files the same but it is changing the locations of their children (for subsequently loaded files that have children with the same names). So either the onLoad is going to the wrong clip or the events about it loading are.

    Read the article

  • Change a UIButton View's background upon press

    - by Michael
    This should be easy but its got me stumped. I've got a button on each row of a table cell. The button is to delete the file associated with that row. I have an image that indicates if the file is present on the iPhone or not present. When the user presses the button, the target action method (showDeleteSheet) then calls a UIActionSheet with a variable to give it the indexPath of the row pressed. Then the user presses delete on the action sheet and the action sheet's clickedButtonAtIndex method deletes the file. Now, I need to update the button's background image property to change the image in the appropriate table cell to the not downloaded image. This can be done in either the button's target action method or the action sheet's clickedButtonAtIndex method. Here is some code: In the table's cellForRowAtIndexPath method I create the button: UIButton *deleteButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; [deleteButton addTarget:self action:@selector(showDeleteSheet:) forControlEvents:UIControlEventTouchDown]; deleteButton.frame = CGRectMake(246, 26, 30, 30); if (![AppData isDownloaded:[dets objectForKey:@"fileName"]]) { [deleteButton setBackgroundImage:notdownloadedImage forState:UIControlStateNormal]; } else { [deleteButton setBackgroundImage:notdownloadedImage forState:UIControlStateNormal]; } In the button's target method: -(void)showDeleteSheet:(id)sender { //get the cell row that the button is in NSIndexPath *indexPath = [table indexPathForCell:(UITableViewCell *)[[sender superview] superview]]; NSInteger currentSection = indexPath.section; NSInteger currentIndexRow = indexPath.row; NSLog(@"section = %i row = %i", currentSection, currentIndexRow); UIButton *deleteButton = [UIButton buttonWithType:UIButtonTypeCustom]; [table reloadData]; //if deleteButton is declared in .h then the other instances of deleteButton show 'local declaration hides instance variable' [deleteButton setBackgroundImage:[UIImage imageNamed:@"not-downloaded.png"] forState:UIControlStateNormal]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Delete this file?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:nil]; actionSheet.tag = currentIndexRow; actionSheet.actionSheetStyle = UIActionSheetStyleDefault; [actionSheet showInView:self.view]; [actionSheet release]; } Perhaps the issue is that the call to [deleteButton setBackgroundImage...]; doesn't know which cell's button should be updated. If so I don't know how to tell it which. Because I test if the file is downloaded when the button is made and the background image is set, when I scroll down so the cell in question is de-queued then scroll back up it show's the correct image. I've tried to force the table to reload but [table reloadData]; is doing nothing. I've tried reloadRowsAtIndexPaths and still no good. Any one care to educate me on how this is done?

    Read the article

  • Problem wth paging ObjectDataSource

    - by funky
    asp page code: <asp:ObjectDataSource runat="server" ID="odsResults" OnSelecting="odsResults_Selecting" /> <tr><td> <wssawc:SPGridViewPager ID="sgvpPagerTop" runat="server" GridViewId="sgvConversionResults" /> </td></tr> <tr> <td colspan="2" class="ms-vb"> <wssawc:SPGridView runat="server" ID="sgvConversionResults" AutoGenerateColumns="false" RowStyle-CssClass="" AlternatingRowStyle-CssClass="ms-alternating" /> </td> </tr> Class code: public partial class Convert : System.Web.UI.Page { ... private DataTable resultDataSource = new DataTable(); ... protected void Page_Init(object sender, EventArgs e) { ... resultDataSource.Columns.Add("Column1"); resultDataSource.Columns.Add("Column2"); resultDataSource.Columns.Add("Column3"); resultDataSource.Columns.Add("Column4"); ... odsResults.TypeName = GetType().AssemblyQualifiedName; odsResults.SelectMethod = "SelectData"; odsResults.SelectCountMethod = "GetRecordCount"; odsResults.EnablePaging = true; sgvConversionResults.DataSourceID = odsResults.ID; ConversionResultsCreateColumns(); sgvConversionResults.AllowPaging = true; ... } protected void btnBTN_Click(object sender, EventArgs e) { // add rows into resultDataSource } public DataTable SelectData(DataTable ds,int startRowIndex,int maximumRows) { DataTable dt = new DataTable(); dt.Columns.Add("Column1"); dt.Columns.Add("Column2"); dt.Columns.Add("Column3"); dt.Columns.Add("Column4"); for (int i =startRowIndex; i<startRowIndex+10 ;i++) { if (i<ds.Rows.Count) { dt.Rows.Add(ds.Rows[i][0].ToString(), ds.Rows[i][1].ToString(), ds.Rows[i][2].ToString(), ds.Rows[i][3].ToString()); } } return dt; } public int GetRecordCount(DataTable ds) { return ds.Rows.Count; } protected void odsResults_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { e.InputParameters["ds"] = resultDataSource; } } On click BTN button resultDataSource receive some rows. Page reload and we can see result in sgvConversionResults. First 10 rows. But after click next page in pager we have message "There are no items to show in this view". When I try debug I find that after postBack page (on click next page) input params "ds" is blank, ds.Rows.Count = 0 and etc... As though resultDataSource became empty(( What do I do not correctly?. Sorry my English.

    Read the article

  • How do I add a custom view to iPhone app's UI?

    - by Dr Dork
    I'm diving into iPad development and I'm still learning how everything works together. I understand how to add standard view (i.e. buttons, tableviews, datepicker, etc.) to my UI using both Xcode and Interface Builder, but now I'm trying to add a custom calendar control (TapkuLibrary) to the left window in my UISplitView application. My question is, if I have a custom view (in this case, the TKCalendarMonthView), how do I programmatically add it to one of the views in my UI (in this case, the RootViewController)? Below are some relevant code snippets from my project... RootViewController interface @interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate> { DetailViewController *detailViewController; NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; } @property (nonatomic, retain) IBOutlet DetailViewController *detailViewController; @property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController; @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; - (void)insertNewObject:(id)sender; TKCalendarMonthView interface @class TKMonthGridView,TKCalendarDayView; @protocol TKCalendarMonthViewDelegate, TKCalendarMonthViewDataSource; @interface TKCalendarMonthView : UIView { id <TKCalendarMonthViewDelegate> delegate; id <TKCalendarMonthViewDataSource> dataSource; NSDate *currentMonth; NSDate *selectedMonth; NSMutableArray *deck; UIButton *left; NSString *monthYear; UIButton *right; UIImageView *shadow; UIScrollView *scrollView; } @property (readonly,nonatomic) NSString *monthYear; @property (readonly,nonatomic) NSDate *monthDate; @property (assign,nonatomic) id <TKCalendarMonthViewDataSource> dataSource; @property (assign,nonatomic) id <TKCalendarMonthViewDelegate> delegate; - (id) init; - (void) reload; - (void) selectDate:(NSDate *)date; Thanks in advance for all your help! I still have a ton to learn, so I apologize if the question is absurd in any way. I'm going to continue researching this question right now!

    Read the article

  • How can I test caching and cache busting?

    - by Nathan Long
    In PHP, I'm trying to steal a page from the Rails playbook (see 'Using Asset Timestamps' here): By default, Rails appends assets' timestamps to all asset paths. This allows you to set a cache-expiration date for the asset far into the future, but still be able to instantly invalidate it by simply updating the file (and hence updating the timestamp, which then updates the URL as the timestamp is part of that, which in turn busts the cache). It‘s the responsibility of the web server you use to set the far-future expiration date on cache assets that you need to take advantage of this feature. Here‘s an example for Apache: # Asset Expiration ExpiresActive On <FilesMatch "\.(ico|gif|jpe?g|png|js|css)$"> ExpiresDefault "access plus 1 year" </FilesMatch> If you look at a the source for a Rails page, you'll see what they mean: the path to a stylesheet might be "/stylesheets/scaffold.css?1268228124", where the numbers at the end are the timestamp when the file was last updated. So it should work like this: The browser says 'give me this page' The server says 'here, and by the way, this stylesheet called scaffold.css?1268228124 can be cached for a year - it's not gonna change.' On reloads, the browser says 'I'm not asking for that css file, because my local copy is still good.' A month later, you edit and save the file, which changes the timestamp, which means that the file is no longer called scaffold.css?1268228124 because the numbers change. When the browser sees that, it says 'I've never seen that file! Give me a copy, please.' The cache is 'busted.' I think that's brilliant. So I wrote a function that spits out stylesheet and javascript tags with timestamps appended to the file names, and I configured Apache with the statement above. Now: how do I tell if the caching and cache busting are working? I'm checking my pages with two plugins for Firebug: Yslow and Google Page Speed. Both seem to say that my files are caching: "Add expires headers" in Yslow and "leverage browser caching" in Page Speed are both checked. But when I look at the Page Speed Activity, I see a lot of requests and waiting and no 'cache hits'. If I change my stylesheet and reload, I do see the change immediately. But I don't know if that's because the browser never cached in the first place or because the cache is busted. How can I tell?

    Read the article

  • Booking form works but does not give feedback

    - by Naim
    I have a form where people can book seats for a given event. It's actually a WordPress plugin. When someone sends his booking, email notifications are sent properly and the event booking status is updated accordingly. The issue is that the booking form does not give any feedback whatsoever. Once you hit "book now", the graphic keeps loading and no feedback is ever displayed like for instance "booking sent successfully" or "there are errors in your form", even though the booking is saved correctly with both sides notified by email. I guess it's a JavaScript issue,Firebug console is not showing any error... So here is the code source of the booking form : Also please experience the issue live Here username: tester password: testsa Thanks! $('#em-booking-form').submit( function(e){ e.preventDefault(); var em_booking_doing_ajax = false; $.ajax({ url: EM.bookingajaxurl, data:$('#em-booking-form').serializeArray(), dataType: 'jsonp', type:'post', beforeSend: function(formData, jqForm, options) { if(em_booking_doing_ajax){ alert(EM.bookingInProgress); return false; } em_booking_doing_ajax = true; $('.em-booking-message').remove(); $('#em-booking').append('<div id="em-loading"></div>'); }, success : function(response, statusText, xhr, $form) { $('#em-loading').remove(); $('.em-booking-message').remove(); $('.em-booking-message').remove(); //show error or success message if(response.result){ $('<div class="em-booking-message-success em-booking-message">'+response.message+'</div>').insertBefore('#em-booking-form'); $('#em-booking-form').hide(); $('.em-booking-login').hide(); $(document).trigger('em_booking_success', [response]); }else{ if( response.errors != null ){ if( $.isArray(response.errors) && response.errors.length > 0 ){ var error_msg; response.errors.each(function(i, el){ error_msg = error_msg + el; }); $('<div class="em-booking-message-error em-booking-message">'+error_msg.errors+'</div>').insertBefore('#em-booking-form'); }else{ $('<div class="em-booking-message-error em-booking-message">'+response.errors+'</div>').insertBefore('#em-booking-form'); } }else{ $('<div class="em-booking-message-error em-booking-message">'+response.message+'</div>').insertBefore('#em-booking-form'); } } $('html, body').animate({ scrollTop: $("#em-booking").first().offset().top - 50 }); //sends user back to top of form //run extra actions after showing the message here if( response.gateway != null ){ $(document).trigger('em_booking_gateway_add_'+response.gateway, [response]); } if( !response.result && typeof Recaptcha != 'undefined'){ Recaptcha.reload(); } }, complete : function(){ em_booking_doing_ajax = false; $('#em-loading').remove(); } }); return false; });

    Read the article

  • Load on page inside another onClick

    - by Robin I Knight
    Hello, I need to include the content, scripts, forms and dynamic abilities of one page in another onClick. Take a look at http://www.divethegap.com/scuba-diving-programmes-dive-the-gap/dahab-master-scuba-diver.html Then follow one of the links that says 'Beginner' 'Open Water Diver' etc.... You will find a PHP page with a series of options. It is an adaption of the wordpress blog system to produce only specific options for specific programmes by considering each type of each diving programme a category and then displaying only results from that category. You will see that each option is also a collapsible panel and there are also several javascripts that calculate durations, quantities and prices. There is also a validating webform at the end. Now go back to the first page. What I would like to do is include all the content from the second page after the main header inside tabbed panels on the first page so that the customers can immidietly see everything that is included. Essentially the options on the first page would become a series of tabs. The only way I can see to do this is with an iFrame as each option would need a unique URL ending (that is .php?cat=26 or .php?cat=27). THe problem is that the collapsible panels will not work with an iFrame as the iFrame will not resize when the panels open. There were also some calculation problems, but I think that was more down to me staring at the screen for the last 3 hours not remembering to include everything. I have tried it with resizing iframe SSI scripts and have got nowhere. I tried actually embedding it in the page better with a ajax script, but that left behind all the scripts that make it work. I checked with full URL's on everything and it would not take work with any scripts. I know that you could just make the whole page reload but then the user would be at the top of the page again, and even if another script was applied to slowly bring them down again it would not be anything near as easy to use as if it was like tabbed panels. Any ideas. Kind Regards,

    Read the article

  • error loading (TypeLoadException) on asp.net/xsp/mono on debian/opensuse

    - by acidzombie24
    When i reset apache and load my website i get the first error below. I have no idea what the problem is. If i reload the page again (without restarting apache) i get the 2nd error, probably because the first error occurred and BaseUser is the first class/func that Application_Start uses. Why am i getting this load exception? Whats messed up is i tried using mono's VMWare img to debug it and i got the very same exception (until i restarted which now refuses to give me anything but 404 errors). However when i use mono develop to run the project the site runs PERFECT. WTF. Any ideas? Server Error in '/' Application A type load exception has occurred. Description: HTTP 500. Error processing request. Stack Trace: System.TypeLoadException: A type load exception has occurred. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433 Second: Server Error in '/' Application Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Description: HTTP 500. Error processing request. Stack Trace: System.TypeLoadException: Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at mynamespace.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433 -edit- i'll mention that i tried MonoDevelops build of my site on both opensuse and my website and i get the exact same problem.

    Read the article

  • Troubles with list "dropdowns" and which list item gets the dropdown

    - by Andrew
    I'm working on a project for an MMO "guild" that gives members of the guild randomly generated tasks for the game. They can "block" three tasks from being assigned. The lists will look something like this: <ul> <li class="blocked">Task that is blocked</li> <li class="blocked-open">Click to block a task</li> <li class="blocked-open">Click to block a task</li> </ul> The blocked-open class means they haven't chosen a task to block yet. The blocked task means they've already blocked a task. When they click the list item, I want this to appear: <ul class="tasks-dropdown no-display"> <li><h1>Click a Task to Block</h1></li> <ul class="task-dropdown-inner"> <?php //output all tasks foreach($tasks as $task) { echo '<li class="blocked-option"><span id="'.$task.'">'.$task.'</span></li>'; } ?> <br class="clear" /> </ul> </ul> I don't quite know how, when the user clicks the .blocked-open line-item, to show that dropdown under only the one they clicked. My jQuery looked like this before I became confused. $("li.blocked-open").click(function() { $("ul.no-display").slideToggle("900"); }); $(".blocked-option span").click(function() { var task = $(this).attr('id'); alert("You have blocked: " + task); location.reload(true); }); I tested it by putting the dropdown under a line item in the code, and it worked fine, but when I have more than one dropdown in the code, clicking on one line item toggles all the dropdowns. I'm not sure what to do. :-p.

    Read the article

  • Using jQuery's ajax get request with parameters, returning page content

    - by Stevie Jenowski
    Thank you for looking at my question, as I appreciate your time. Okay, so I'm trying to use jQuery's get function to call my php script which ultimately returns a variable which is a built template of the main content of my page minus my static header/footer, for which I would like to replace the "old" page content without the page reloading. Can anyone point me in the right direction as to where I'm going wrong here? My code is as follows... jQuery: function getData(time, type) { $.ajax({ type: "GET", url: "getData.php", data: "time=" + time + "&type=" + type, success: function(data){ $('#pageContent').fadeOut("slow"); $('#pageContent').html(data); $('#pageContent').fadeIn("slow"); } }); return false; } getData.php(paraphrased): .... $time = empty($_GET['time']) ? '' : $_GET['time']; $type = empty($_GET['type']) ? '' : $_GET['type']; echo getData($time, $type); function getData($time, $type) ...... ..... $tmpl = new Template(); $tmpl->time= $time; $tmpl->type = $type; $builtpage = $tmpl->build('index.tmpl'); return $builtpage; ..... ...... jQuery function call: <a href="#" onclick="getData("<?php print $tmpl->time; ?>", "Orange")">Orange</a> <a href="#" onclick="getData("<?php print $tmpl->time; ?>", "Apple")">Apple</a> <a href="#" onclick="getData("<?php print $tmpl->time; ?>", "Banana")">Banana</a> When I click any link, the ajax seems to run fine, and the page does refuse to reload, but the content still remains unchanged... Anyone happen to know what's up?

    Read the article

  • how to handle a array of objects in a session

    - by Robert
    Hello, In the project I'm working on I have got a list List<Item> with objects that Is saved in a session. Session.Add("SessionName", List); In the Controller I build a viewModel with the data from this session var arrayList = (List<Item>)Session["SessionName"]; var arrayListItems= new List<CartItem>(); foreach (var item in arrayList) { var listItem = new Item { Amount = item.Amount, Variant= item.variant, Id = item.Id }; arrayListItems.Add(listItem); } var viewModel = new DetailViewModel { itemList = arrayListItems } and in my View I loop trough the list of Items and make a form for all of them to be able to remove the item. <table> <%foreach (var Item in Model.itemList) { %> <% using (Html.BeginForm()) { %> <tr> <td><%=Html.Hidden(Settings.Prefix + ".VariantId", Item .Variant.Id)%> <td> <%=Html.TextBox(Settings.Prefix + ".Amount", Item.Amount)%></td> <td> <%=Html.Encode(Item.Amount)%> </td> <td> <input type="submit" value="Remove" /> </td> </tr> <% } %> <% } %> </table> When the post from the submit button is handeld the item is removed from the array and post back exactly the same viewModel (with 1 item less in the itemList). return View("view.ascx", viewModel); When the post is handled and the view has reloaded the value's of the html.Hidden and Html.Textbox are the value's of the removed item. The value of the html.Encode is the correct value. When i reload the page the correct values are in the fields. Both times i build the viewModel the exact same way. I cant find the cause or solution of this error. I would be very happy with any help to solve this problem Thanx in advance for any tips or help

    Read the article

  • PHP: Remove Simple Session with Get-Method

    - by elmaso
    Hello, I want to Remove the Sessions from this php code, actually if someone searches i get this url search.php?searchquery=test but if I reload the page, the results are cleaned. how can I remove the Sessions to get the Results still, if someone reloads the page? this are the codes: search.php <?php session_start(); ?> <form method="get" action="querygoogle.php"> <label for="searchquery"><span class="caption">Search this site</span> <input type="text" size="20" maxlength="255" title="Enter your keywords and click the search button" name="searchquery" /></label> <input type="submit" value="Search" /> </form> <?php if(!empty($_SESSION['googleresults'])) { echo $_SESSION['googleresults']; unset($_SESSION['googleresults']); } ?> querygoogle.php <?php session_start(); $url = 'http://www.example.com'; $handle = fopen($url, 'rb'); $body = ''; while (!feof($handle)) { $body .= fread($handle, 8192); } fclose($handle); $json = json_decode($body); foreach($json->responseData->results as $searchresult) { if($searchresult->GsearchResultClass == 'GwebSearch') { $formattedresults .= ' <div class="searchresult"> <h3><a href="' . $searchresult->unescapedUrl . '">' . $searchresult->titleNoFormatting . '</a></h3> <p class="resultdesc">' . $searchresult->content . '</p> <p class="resulturl">' . $searchresult->visibleUrl . '</p> </div>'; } } $_SESSION['googleresults'] = $formattedresults; header("Location: search.php?searchquery=" . $_GET['searchquery']); exit; ?> thank you for your help!!

    Read the article

  • Best of both worlds: browser and desktop game?

    - by Ricket
    When considering a platform for a game, I've decided on multi-platform (Win/Lin/Mac) but can't make up my mind as far as browser vs. desktop. As I'm not all too far in development, and now having second thoughts, I'd like your opinion! Browser-based games using Java applets: market penetration is reasonably high (for version 6, it's somewhere around 60% I believe?) using JOGL, 3D performance/quality is decent; certainly good enough to render the crappy 3D graphics that I make there's the (small?) possibility of porting something to Android great for an audience of gamers who switch computers often; can sit down at any computer, load a webpage and play it also great for casual gamers or less knowledgeable gamers who are quite happy with playing games in a browser but don't want to install more things to their computer written in a high-level language which I am more familiar with than C++ - but at the same time, I would like to improve my skills with C++ as it is probably where I am headed in the game industry once I get out of school... easier update process: reload the page. Desktop games using good ol' C++ and OpenGL 100% market penetration, assuming complete cross-platform; however, that number reduces when you consider how many people will go through downloading and installing an executable compared to just browsing to a webpage and hitting "yes" to a security warning. more trouble to maintain the cross-platform; but again, for learning purposes I would embrace the challenge and the knowledge I would gain better performance all around true full screen, whereas browser games often struggle with smooth full screen graphics (especially on Linux, in my experience) can take advantage of distribution platforms such as Steam more likely to be considered a "real" game, whereas browser and Java games are often dismissed as not being real games and therefore not played by "hardcore gamers" installer can be large; don't have to worry so much about download times Is there a way to have the best of both worlds? I love Java applets, but I also really like the reasons to write a desktop game. I don't want to constantly port everything between a Java applet project and a C++ project; that would be twice the work! Unity chose to write their own web player plugin. I don't like this, because I am one of the people that will not install their web player for anything, and I don't see myself being able to convince my audience to install a browser plugin. What are my options? Are there other examples out there besides Unity, of games that have browser and desktop versions? Did I leave out anything in the pro/con lists above?

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56  | Next Page >