I’m trying to send to my application the coords x,y on an “input type
image” in a html form, but x,y variables are not present in the
POST_DATA (are not submitted). Any other field (hidden inputs) are being
sent when I click on the image input form field.
I use rails 1.0 and prototype 1.4, browsers Seamonkey
2.0, Firefox 1.x and Konqueror, Linux, and I’m just a newbie in ror.
My guess is that Form.serialize (in prototype.js) ignores
You could modify Form.Element.Serializers (input) and add the desired
behaviour for type “image”
My guess is that Form.serialize (in prototype.js) ignores
You could modify Form.Element.Serializers (input) and add the desired
behaviour for type “image”
Your guesss is be right. But after some reading, i found out that x,y
coordinates of the click are not available in the forms objects, so
can’t use . I’ll try something else.
Form.Element.Serializers = {
input: function(element) {
switch (element.type.toLowerCase()) {
case ‘submit’:
case ‘hidden’:
case ‘password’:
case ‘text’:
return Form.Element.Serializers.textarea(element);
case ‘checkbox’:
case ‘radio’:
return Form.Element.Serializers.inputSelector(element);
}
return false;
},
–
They say money can’t buy happiness? Look at the smile on my face… ear
to ear, baby!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.