Search Results

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

Page 37/56 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • One model and Many edit views

    - by user179438
    Hi, I have a model I named User, and I want use two different Views to edit it: the usual edit view and another view I called edit_profile. I had no problem in creating routing, controller and views: I added edit_profile and update_profile views, and I added on routes.rb the line: map.resources :users ,:member => {:edit_profile => :get, :update_profile => :put} The problem is: when I submit the form in edit_profile and some error occur in some input fields, rails reload the edit_path page instead of edit_profile_path page ! This is the form on edit_profile.html.erb form_for(:user, @user, :url => {:action => :update_profile}, :html => { :method => :put} ) do |f| = f.text_field :description = f.text_area :description = f.error_message_on :description .... .... = f.submit 'Update profile' After clicking Update profile, if input errors occur I want to show edit_profile view instead of edit view Do You have some ideas ? many thanks

    Read the article

  • mongrel not working - Ruby on Rails

    - by Steven
    I have deployed my rails app to a live server(linux) and I have successfully installed the the mongrel gems, and I can successfully start the server for my app but when i try to acceess the website on the server i get the error The server at 196.xx.xxx.xx is taking too long to respond. Is there anything i need to do to be able to access my app on the browser? Mongrel Logs ** Starting Rails with production environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM = stop. USR2 = restart. INT = stop (no restart). ** Rails signals registered. HUP = reload (without restart). It might not work well. ** Mongrel 1.1.5 available at 0.0.0.0:3001 ** Writing PID file to /home/xxxxxxx.co.za/shared/log/mongrel.pid

    Read the article

  • Adobe edge animation fails to load first time in Opera, Crome but works in Firefox and Safari

    - by user3721777
    I have quite a serous problem here since I work on this animation for a while, I have a Adobe Edge Animation (done in CC) that fails to load the first time in Opera and Crome but does work in Firefox and Safari. It fail to load every time coming from another page. Only work if you reload. The problem persist both locally and online. It does work in preview every single time. I you can push me in the right direction, that would be great. Thanks! Here you can see the animation: http://tierraburritos.com/test/laCarta.html

    Read the article

  • What workflow should I use for JavaScript editing?

    - by Patrick
    Warning: I have very little JavsScript experience. In my past programming experience, I usually have a standalone interpreter/compiler, a text editor and a command line to compile/run my software or my tests (I love test driven development). I really like it this way, since I have the feeling of being in complete control over the tools. However, editing JavaScript I need to put statements in a text file , open my web browser and click on reload. I don't feel comfortable with it, as I cannot really see what is going on (besides some alert boxes). Can you suggest me (I'm on a Mac) another workflow? Perhaps with a debugger? Is there a standalone JavaScript interpreter?

    Read the article

  • IE issues with drag/drop (script.aculo.us)

    - by deb
    I have a page with a left and a right div. Inside each of these there are several divs. I can drag&drop them inside the left/right divs or move from one to the other So the page is something like ........ ........ ........ ........ I am using scriptaculous and prototype for the drag&drop If I drag in Firefox things work fine. In IE6-IE8 however I have 2 problems: 1) When I drag from left to right or the other way around, the inner divs do not keep their relative distances: the div I moved now overlaps with the div on the opposite side (if I do a reload of the page the divs are set correctly again) 2) If I shrink the window width below a certain width the divs either on the left or the right droppable disappear. Any ideas? deb

    Read the article

  • Read from values from hidden field values in Jquery?

    - by James123
    Last two nights I am struggle with below code. The problem is I need to remember expanded (or) collapsed toggles sections and on page reload I have show them as is expanded (or) collapsed. $(function() { $('tr.subCategory') .css("cursor", "pointer") .attr("title", "Click to expand/collapse") .click(function() { $(this).siblings('.RegText').toggle(); }); $('tr[@class^=RegText]').hide().children('td'); }) I found small solution in another forum like this. Storing ".subCategory" id values in hidden field in commas-seperated values. In Asp.net page: <input id="myVisibleRows" type="hidden" value="<% response.write(myVisibleRowsSavedValue) %" /> In .js: var idsStr = $(#myVisibleRows).val(); Now My question is: How to store multiple values (.subCategory id) in hidden field when I click on toggle?. also How to parse them back and iterate them get ids and show toggles?. I am very very new to jQuery. Please some one help me out from this.

    Read the article

  • GAE app.yaml appears to be inconsistently routing requests

    - by kamens
    I have the following in app.yaml: - url: /gae_mini_profiler/static static_dir: gae_mini_profiler/static - url: /gae_mini_profiler/.* script: gae_mini_profiler/main.py - url: .* script: main.py and the following in gae_mini_profiler/main.py: def main(): logging.critical("gae_mini_profiler request!") run_wsgi_app(application) However, when I fire requests to, say, /gae_mini_profiler/request?request=ABC, and repeatedly reload the page, sometimes I will get the proper response (as well as a "gae_mini_profiler request!" log entry, and sometimes I get a blank response and nothing in the App Engine logs other than a 200 with an empty response body. This is completely reproducible, only happens in the live environment, and I'd say ~50% of the refreshes work while 50% do not. This only happens in production. Any ideas?

    Read the article

  • UITableView animations for a "lazy" UI design?

    - by donuts
    I have a UITableViewController that allows the user to perform editing tasks. Now, once a user has committed his change, the table view doesn't directly change the model and updates the table, rather "informs" the model what the user wants to do. The model in turn updates accordingly and then posts a notification that it has been changed. As far as I've seen, I need to begin/end updates on the tableview and in between change the model to its' final form. My changes though, are asynchronous and cannot guarantee to update the model before 'tableview endupdates' is called. Currently, each time I receive a 'model did change' notificaiton, I reload the entire table. So, how can I really make cell animations (delete/insert) work? Should the model fire a notification for each little change instead of the entire table?

    Read the article

  • Refreshing a echoed PHP variable after jQuery AJAX success?

    - by Matt
    Hello, I have a shopping cart in Codeigniter in which products are added to the cart using (jQuery) Ajax. In the header of each page it displays the number of contents in the cart using <?php echo $this->cart->total_items(); ?> How can I update/refresh this variable when a product is added to the cart, as I am using AJAX to add products to the cart and thus the page isn't being reloaded when products are added. It seems pointless to use AJAX to do asyncronous stuff if I have to reload the page to get the new number of total items from the server. Many thanks.

    Read the article

  • app engine's back referencing is too slow. How can I make it faster?

    - by Ray Yun
    Google app engine has smart feature named back references and I usually iterate them where the traditional SQL's computed column need to be used. Just imagine that need to accumulate specific force's total hp. class Force(db.Model): hp = db.IntegerProperty() class UnitGroup(db.Model): force = db.ReferenceProperty(reference_class=Force,collection_name="groups") hp = db.IntegerProperty() class Unit(db.Model): group = db.ReferenceProperty(reference_class=UnitGroup,collection_name="units") hp = db.IntegerProperty() When I code like following, it was horribly slow (almost 3s) with 20 forces with single group - single unit. (I guess back-referencing force reload sub entities. Am I right?) def get_hp(self): hp = 0 for group in self.groups: group_hp = 0 for unit in group.units: group_hp += unit.hp hp += group_hp return hp How can I optimize this code? Please consider that there are more properties should be computed for each force/unit-groups and I don't want to save these collective properties to each entities. :)

    Read the article

  • Macro to create macros?

    - by JMarsch
    Over the years, I've built up a number of macros that I like to have available in visual studio. It's always a pain to reload them and rebind them to the keyboard when I go to a different machine/rebuild/use a VM/etc. Someone mentioned to me once that there is a way that you can write a macro that will recreate your macros and bind them to keys automatically. Anyone know how to do that? Is there another way to easily export/import macros (nonsensically, VS has an "export macro" function, but no import).

    Read the article

  • Create a javascript chome extention that does not execute in 6 months

    - by user1907657
    I have just started learning programming and I would like to make a script into a chrome extension. Its a basic script and I hope to practice more and more and develop bigger projects and set myself bigger tasks This script has to do the following : reload a page every 20 seconds (say google.com) after 6 months the script must not run (maybe prompt a window saying "its over 6 months") The code should be able to go into a small chrome extension and also the 6 month time period should be absolute not relative to the time the script was started; for example should the browser crash and i have to turn on the extension again it should not restart the 6 month counter. Also if anyone could recommend any good sources for JavaScript to learn (preferably books; nothingIi read online ever seems to stick)

    Read the article

  • Go, AppEngine: How to structure templates for application

    - by laslowh
    How are people handling the use of templates in their Go-based AppEngine applications? Specifically, I'm looking for a project structure that affords the following: Hierarchical (directory) structure of templates and partial templates Allow me to use HTML tools/editors on my templates (embedding template text in xxx.go files makes this difficult) Automatic reload of template text when on dev server Potential stumbling blocks are: template.ParseGlob() will not traverse recursively. For performance reasons it has been recommended not to upload your templates as raw text files (because those text files reside on different servers than executing code). Please note that I am not looking for a tutorial/examples of the use of the template package. This is more of an app structure question. That being said, if you have code that solves the above problems, I would love to see it. Thanks in advance.

    Read the article

  • Adding a UILabel to a UIToolbar

    - by Boolean
    I'm trying to add a label to my toolbar. Button works great, however when I add the label object, it crashes. Any ideas? UIBarButtonItem *setDateRangeButton = [[UIBarButtonItem alloc] initWithTitle:@"Set date range" style:UIBarButtonItemStyleBordered target:self action:@selector(setDateRangeClicked:)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 20, 20)]; label.text = @"test"; [toolbar setItems:[NSArray arrayWithObjects:setDateRangeButton,label, nil]]; // Add the toolbar as a subview to the navigation controller. [self.navigationController.view addSubview:toolbar]; // Reload the table view [self.tableView reloadData];

    Read the article

  • can not find out if the div element is already set in body in chrome extension

    - by alpham8
    in my chrome extension I got an div, which I will add to the body of the current tab. I am listening to chrome.tabs.onUpdated. If this event is called, I execute a script inside content_scripts. In this function there I´ll wait till the document is ready with jQuery $(document).ready(...). I try to access $("#div").length and sometimes it returns 1 and sometimes 0. It should added to the body, if it´s not already there. For some strange reasons, the onUpdated event is called twice on each page reload. Actually I found no way to check safely if the div was already added.

    Read the article

  • Methods of sending web-generated config files to servers and restarting services.

    - by JPG
    Hi, We're writing a web-based tool to configure our services provided by multiple servers. This includes interfaces configuration, dhcp configs etc. etc. Having configs in database and views that generate proper output, how to send it/make it available for servers? I'm thinking about sending it through scp and invoking reload command to services through ssh. I'm also thinking about using Func to do all the job, as this is Python tool and will seemingly integrate with python-based (django) config tool. Any other proposals?

    Read the article

  • undefined index mode, which is the variable that case statement is looking for

    - by Brad
    receiving error: PHP Notice: Undefined index: mode in /web/ee_web/include/form-modal.php on line 51 line 51 switch($_GET["mode"]) { block of code it is in: switch($_GET["mode"]) { case "login": login_user(); break; case "logout": session_destroy(); print "<p>You are now logged out.</p>"; print "<p><input type=\"submit\" id=\"closeButton\" name=\"closeButton\" value=\"Close\" onclick=\"self.parent.tb_remove(); parent.location.reload(1);\" /></p>"; break; default: login_user(); //print "<p>How'd you end up here?</p>"; break; } The URL for the page is index.php?mode=logout, that is how I am passing the value into mode. Any way I could resolve this error message?

    Read the article

  • Grails searchable plugin with hasMany

    - by user2624442
    I am using grails searchable plugin to search my domain classes. However, I cannot yet search by my hasMany (skills and interests) fields even though they are of the simple type String. This is my domain class: class EmpactUser { static searchable = [except: ['dateCreated','password','enabled','accountExpired','accountLocked','passwordExpired']] String username String password boolean enabled = true boolean accountExpired boolean accountLocked boolean passwordExpired String email String firstName String lastName String address String phoneNumber String description byte[] avatar byte[] resume Date dateCreated static hasMany = [ skills : String, interests : String, // each user has the ability to list many skills and interests so that they can be matched with a project. ] static constraints = { username blank: false, unique: true password blank: false email email: true, blank: false firstName blank: false lastName blank: false description nullable: true address nullable: true avatar nullable: true, maxSize: 1024 * 1024 * 10 resume nullable: true, maxSize: 1024 * 1024 * 10 phoneNumber nullable: true, matches: "/[(][+]d{3}[)]d+/", maxSize: 30 } } This is the code I am using to search: def empactUserList = EmpactUser.search( searchQuery, [reload: false, result: "every", defaultOperator: "or"]) Am I missing something? Thanks, Alan.

    Read the article

  • DOMNodeInserted or hashchange

    - by jakey
    I am trying to write a JavaScript script that is "overlayed" on top of a Facebook page. It uses DOMContentLoaded to detect when content is loaded, then adds some extra stuff in. However, because Facebook doesn't actually "reload" the page when going to a new page (it just uses AJAX), the DOMContentLoaded handler doesn't run again, even though there is new stuff to look through. Anyway, to detect the change, I thought about using onhashchange since Facebook used to change the page's hash, but in Firefox 4 (I need to support Firefox 3 and later with this, but no other browsers), Facebook doesn't change the hash anymore and in pre-Firefox 3.6 there is no onhashchange. I thought about using DOMNodeInserted, but would that really slow down the page? (I really can't have any slowdowns in this script.)

    Read the article

  • Deny access to a PHP file (Nginx)

    - by Desmond Hume
    I want Nginx to deny access to a specific PHP file, let's call it donotexposeme.php, but it doesn't seem to work, the PHP script is run as usual. Here is what I have in the config file: location / { root /var/www/public_html; index index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/public_html$fastcgi_script_name; include fastcgi_params; } location /donotexposeme.php { deny all; } Of course, I do sudo service nginx reload (or restart) each time I edit the config.

    Read the article

  • Use AJAX to check for a new message

    - by Luke
    Quite simply, I need to alert the end user when they have a new private message. From a combination of research and other opinion, I realise I need to use AJAX for this. The mysql query would be SELECT id FROM tbl_messages WHERE to_viewed = 1 So when someone sends a message, I want an alert to popup on the screen to inform the user without a page reload. I have absolutely no idea what I am doing, but know what I want. Really need help with this, AJAX is definitely something I want to improve as it opens up greater possibilities! Thanks

    Read the article

  • Auto refresh of page in Rails 3 using javascript

    - by teknull
    I have a view in my rails app: blah.app/units/status This displays a status of all my units. I'd like to have the page automatically refresh via javascript but I'm not sure how to do it. I tried writing this but it doesn't reload: <script> $(function() { setInterval(function(){ $.getScript("/units/status"); }, 10000); }); </script> Can someone point out where I'm going wrong here?

    Read the article

  • xmlhttprequest vs jquery load();

    - by testkhan
    i am trying to making php ajax based chat system....and i have developed it successfully...i am using jquery load() with setInterval to reload chat every 1 second and it works fine on my localhost....but when i uploaded it on my hosting server it also works fine ... but problem is that after few mintues of chat the server takes to much long gets heavy loaded so that my server goes and and site goes down... my question is that, why it is happening so far...and what is the solution...should i use standard xmlhttprequest instead of load() or $.ajax() instead of load();

    Read the article

  • Submit form without page reloading

    - by Camran
    I have a classifieds website, and on the page where ads are showed, I am creating a "Send a tip to a friend" form... So anybody who wants can send a tip of the ad to some friends email-adress. I am guessing the form must be submitted to a php page right? <form name='tip' method='post' action='tip.php'> Tip somebody: <input name="tip_email" type="text" size="30" onfocus="tip_div(1);" onblur="tip_div(2);"/> <input type="submit" value="Skicka Tips"/> <input type="hidden" name="ad_id" /> </form> When submitting the form, the page gets reloaded... I don't want that... Is there any way to make it not reload and still send the mail? Preferrably without ajax or jquery... Thanks

    Read the article

  • Quicktabs with AJAX Views

    - by Primus202
    I'm working in Drupal 7 with the quicktabs and views modules. I have a great looking tabbed set of tables filled with data. However, despite all the views having AJAX turned on, trying to do a column sort (or use the pager I imagine though currently there is not enough content to require one) causes the page to reload with a new URL instead of simply reloading the view in question. I found on Drupal some fixes for this problem but all seem to be in Drupal 6. Anyone have a patch for 7?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >