similar to: Live Search problems - HELP

Displaying 20 results from an estimated 6000 matches similar to: "Live Search problems - HELP"

2006 Mar 17
0
Returning from Ajax call - "redirect_to error"
I have Ajax commenting on my site, well, I''m trying to get it working. It worked fine locally, but when I posted to the server, I''m getting an "Application Error (Rails)", and I checked the logs, and it has: (stack trace too deep) /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:447:in `url_for''
2006 Mar 17
2
Security issue dealing with comment posting - anyone?
This is how I''m posting comments currently. This works, but I read somewhere that I shouldn''t inject params right into my sql query, because it makes it easy for people to hack in and ruin the db. I''m not sure if this even makes sense, but I''ve tried other things, and can''t get anything else to work. #currently def comments content =
2006 Mar 11
4
Live search in Rails
Hi i''ve been trying to implement live search on rails but Im having trouble Im using a tutorial at: http://www.joestelmach.com/blog/live_search_with_ruby_on_rails But im getting a syntaxerror on line 1 ''1: <% if @items && @items.length > 0% >'' I cant fathom what im doing wrong, is that line calling a column in my database called items?
2006 May 12
0
RJS, Safari, Error - DOM exception 7
I''m having nasty cross-browser headache. Not new to Rails, but quite new to AJAX/RJS. My app works perfectly in Firefox, but generates the error in the subject line in Safari. Pretty simple circumstance, completely reproducible in all cases: Any ideas? Relevant code attached. Layout: ------- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC
2006 Mar 17
1
How to handle errors - HELP
I''m having trouble with my Ajax comments, but only when someone clicks the submit button when there''s no comment. How can I handle this in my code? Do I use "rescue nil" or something? Here''s my controller: def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment
2006 May 06
1
Ajax commenting - PLEASE HELP!!!!
I''m trying to post comments using Ajax. It seems that I have an infinite loop somewhere, because it hangs on the return from the Ajax call. The comment does get saved to the DB, but I have to refresh the page for it to show. The reason I know it''s some sort of infinite loop, is because I''m showing a "loading.gif" image, and it never goes away. Plus, if
2005 Nov 09
3
AJAX form Parameters jumbled.
Sorry for the repost but I originally posted this as a response to another thread. I have a text field called ''phrase'' but the parameter values always come up as nil and when I check the parameters dumped in the error message I do not get the normal hash you''d expect. Instead of something like {"phrase"=>"jim"} I get:
2006 Apr 13
0
text_field_with_auto_complete and foreign characters
I need a form where the user must enter a city name. I would like to use an autocomplete_field for the city name, so I have the following code in my view: <%= text_field_with_auto_complete ''entry'', ''city_name'', :size => 40 %> and in my controller I have the method: def auto_complete_for_entry_city_name @cities = City.find(:all,
2006 Apr 25
0
Submit a form_remote from arbitrary JS
What I want to do is trigger an AJAX form submit from an event handler for a form element. The form is named, and I tried calling formname.submit() from the onblur handler. However, instead of using the settings from the form_remote_tag above it, the form ends up submitting the whole browser. I know what you''re thinking, why not use an observer? I tried that, and I ran into some
2006 Mar 17
1
RSS problem when trying to display ID - HELP
I want to append "#comment-1" or whatever, depending on the id to the end of my xml.link(" ... /#comment-1") attribute in my generated xml. Well, when I put: xml.link(" ... /#comment-" + comment.id) I get an Application error (rails) message when I look at the generated XML. This is what I''m doing without the id on the comments (its working fine):
2007 Jun 07
6
Can't download files with send_data or send_file
I have a form_remote_tag that calls a method to print out a csv file for download. If I tell the form_remote_tag to update a div the data comes up in that div, but otherwise I can''t get the browser to acknowledge the sent file. >From view: <%= form_remote_tag :url => {:action => "csv_dump" }%> <%= submit_tag "Download Complete List" ,:name
2006 Apr 24
4
Joined search returns NIL ids
I have two models: assets and makes. Make has many assets and an asset belongs to one make. I am calling this part of my asset controller from a search form with the parameters "search" (search term) and "field" (database field heading) which then renders a partial with the search results on it. ######################################################## if
2006 Apr 23
5
Newbie Ajaxy Question
Hi all, I''ve been trying to figure this out by myself and while I feel I''ve made some progress, I feel kind of stuck. Let me see if I can explain what I''m trying to do. I have a very simple form with a text box and a text area. The text in each of these will eventually make it into a row in a table in my database. For now, the value in the text box represents a
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out why I keep getting the ''wrong number of arguments (1 for 2)'' error with the following code when I try to create a new record. If anyone can see what is going wrong here please help! new.rhtml ------------------------------------------------- ... <%= start_form_tag :action =>
2006 Apr 24
0
observe_field inside of a form?
Hi I''ve just started experimenting with AJAX in Rails and have come across this issue. I''m trying to set up some ajax form validation on a login form. I set up an observe_field method for the username field but the action for the containing form is being called and rendered instead of the action I specify in the observe_field method. All of the observe_field examples
2006 Jul 20
1
Ajax and observe_field not updating specified DIV
I have a page that has a dropdown which i''m using observe_field on to make an ajax call back to my controller. The page initially displays fine. The method is invoked in my controller when i select a choice in the dropdown and I have an rjs file which is then invoked. The rjs file looks like this: page.replace_html ''embed_calendar'', :partial =>
2006 Oct 17
1
nil object in live search
Hi,I am trying to implement a small live search thing in typo. the view that I interative with is view/admin/content/_form.rhtml I created a search field when creating an article and use observe_field to observe this search field and tells the content_controller to search in database for the appropriate match. But when I tried to type a letter in the search field, I''ve got the
2011 Dec 07
0
Puppet Inventory Service - class search
I am looking to rewrite some modules that currently use storeconfigs (nagios being the big one) to instead pull from the inventory service the required information instead. Some of the checks are as easy as a monitoring check that gets put into place whenever a specific class is included. I know I can have my class install a fact I can then query for, but to remove the service i then need to
2006 Nov 04
0
form_remote_tag problems with post url
Hi, I''m hitting a bump with the form_remote_tag, and wondering if anyone can help.. SO i''m trying to implement a tag-based search on a site and using routes, I can enter a url such as http://localhost/tag/query , which calls an action ''search'', and returns all the posts which are tagged with the word ''query''.. fine... In the
2006 May 12
1
Uploading a file with form_remote_tag problem.
params[uploaded_file] is not recognised when i try form_remote_tag like this: <%= form_remote_tag :url=>{:action => "save_file"} ,:html=>{:multipart => true} <%=text_field_tag "name"%> <input type="file" id="uploaded_file_file" name="uploaded_file[file]"/> <input type="submit"