Hi, I have some strange output in my log file, where I am sending information via a form to the database, eg: <-- snip --> Processing StoreController#add_var_product (for 127.0.0.1 at 2006-01-30 12:30:19) [POST] Parameters: {"size"=>{"id"=>""}, "x"=>"44", "y"=>"11", "action"=>"add_var_product", "controller"=>"store"} <-- snip--> Although I can get things working no problem, these strange values seem to have appended themselves to the data I am POST''ing ? The basic look of the page is several different forms for different products, is it possible these "x" and "y" values are marking a position on page ? Tis pretty clever if so..... Any ideas ? Kind Regards, Paul This message has been checked for all known viruses by the MessageLabs Virus Control Centre. ********************************************************************* Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Ocado Limited Titan Court 3 Bishops Square Hatfield Business Park Hatfield Herts AL10 9NE *********************************************************************
Are you using an image as a submit button? - I would guess that the x and y are to do with your mouse position on the button when you click ''submit''... On 30/01/06, Paul Wright <paul.wright@ocado.com> wrote:> Hi, > > I have some strange output in my log file, where I am sending information > via a form to the database, eg: > > <-- snip --> > Processing StoreController#add_var_product (for 127.0.0.1 at 2006-01-30 > 12:30:19) [POST] > Parameters: {"size"=>{"id"=>""}, "x"=>"44", "y"=>"11", > "action"=>"add_var_product", "controller"=>"store"} > <-- snip--> > > Although I can get things working no problem, these strange values seem to > have appended themselves to the data I am POST''ing ? > > The basic look of the page is several different forms for different > products, is it possible these "x" and "y" values are marking a position on > page ? Tis pretty clever if so..... > > Any ideas ? > > Kind Regards, > Paul > > > This message has been checked for all known viruses by the MessageLabs Virus Control Centre. > > > ********************************************************************* > > Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. > If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. > > Company reg. no. 3875000. > Ocado Limited > Titan Court > 3 Bishops Square > Hatfield Business Park > Hatfield > Herts > AL10 9NE > > > ********************************************************************* > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Raz wrote:> Are you using an image as a submit button? - I would guess that the x > and y are to do with your mouse position on the button when you click > ''submit''...I''m actually using a image for the submit button. Is there any way to turn it off so that the x and y coordinates are not sent? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Raymond O''connor wrote:> I''m actually using a image for the submit button. Is there any way to > turn it off so that the x and y coordinates are not sent?Yea, I''d love to know the same thing. I notice digg.com does this for their search bar, but x and y are not sent in their get request. Yet for me, x and y are always automatically sent. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Has anybody found how to remove x and y values from what is sent by the form? Thanks Paul Wright wrote:> Hi, > > I have some strange output in my log file, where I am sending > information > via a form to the database, eg: > > <-- snip --> > Processing StoreController#add_var_product (for 127.0.0.1 at 2006-01-30 > 12:30:19) [POST] > Parameters: {"size"=>{"id"=>""}, "x"=>"44", "y"=>"11", > "action"=>"add_var_product", "controller"=>"store"} > <-- snip--> > > Although I can get things working no problem, these strange values seem > to > have appended themselves to the data I am POST''ing ? > > The basic look of the page is several different forms for different > products, is it possible these "x" and "y" values are marking a position > on > page ? Tis pretty clever if so..... > > Any ideas ? > > Kind Regards, > Paul-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s coming from the image you are using to let your users submit the form. The x and y are the coordinates on the image that they clicked. -- James Mitchell On May 31, 2007, at 12:20 PM, Michel ( Dagnan ) wrote:> > Has anybody found how to remove x and y values from what is sent by > the > form? > > Thanks > > Paul Wright wrote: >> Hi, >> >> I have some strange output in my log file, where I am sending >> information >> via a form to the database, eg: >> >> <-- snip --> >> Processing StoreController#add_var_product (for 127.0.0.1 at >> 2006-01-30 >> 12:30:19) [POST] >> Parameters: {"size"=>{"id"=>""}, "x"=>"44", "y"=>"11", >> "action"=>"add_var_product", "controller"=>"store"} >> <-- snip--> >> >> Although I can get things working no problem, these strange values >> seem >> to >> have appended themselves to the data I am POST''ing ? >> >> The basic look of the page is several different forms for different >> products, is it possible these "x" and "y" values are marking a >> position >> on >> page ? Tis pretty clever if so..... >> >> Any ideas ? >> >> Kind Regards, >> Paul > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, I''ve figured it out :) But is it possible to delete them ? James Mitchell wrote:> That''s coming from the image you are using to let your users submit > the form. The x and y are the coordinates on the image that they > clicked. > > > -- > James Mitchell-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
From where? Your log files? The address bar? Stop using an image to post your forms, and I promise they will disappear. ;) Or, if that''s not an option ignore them. ;) If that''s not an option, put a filter on your controller, or for a global fix, move the filter to the application.rb file. The below demonstrates stripping it from the params as they come in. It''s not entirely clear to my why they would cause you problems. The only logical thing I can think of is if you are logging all params globally and just want to reduce some noise. If not, oh well, have fun! Example: ----> console $ rails dagnan $ cd dagnan/ $ mate . $ script/server $ script/generate controller foo index ----> app/controllers/foo_controller.rb <form name="foo" action="/foo/index" method="get"> Name: <input type="text" name="name" value="<%=params["name"]%>"> <br/> <input type="submit" name="Submit" value="Submit"> <br/> <input type="image" src="/images/rails.png"> </form> ----> app/views/foo/index.rhtml class FooController < ApplicationController before_filter :clense def index params.each do |t| puts "#{t[0]} => #{t[1]}" end end def clense params.delete("x") params.delete("y") end end -- James Mitchell On May 31, 2007, at 3:36 PM, Michel ( Dagnan ) wrote:> > Yeah, I''ve figured it out :) But is it possible to delete them ? > > James Mitchell wrote: >> That''s coming from the image you are using to let your users submit >> the form. The x and y are the coordinates on the image that they >> clicked. >> >> >> -- >> James Mitchell > > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---