search for: myform

Displaying 20 results from an estimated 36 matches for "myform".

Did you mean: myfirm
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert ("You must fill in all of the required fields!") return false } else return true; } //--> </...
2008 Mar 10
5
Passing extra parameters to functions called from Observers
Hi again, When you have an ''obeserver'' setup as follows: $(''myForm'').observe(''submit'', validateForm); If a user submits the form the ''validateForm'' function is called and is automagically passed the ''event'' to work with. This is fantastic! But is there a way to pass another argument to the function?...
2006 Apr 24
4
javascript in RoR page - Check ALL/uncheck ALL buttons
I am trying to implement a check all and uncheck all button for my check boxes. Here is what I have below. I am getting this error each time: Error: document.myform.add_visit_for_this_Pt has no properties Source File: http://localhost:3000/AddPatientVisit/addvisits Line: 1 Strange that I can''t seem to pass value into the function. Thanks for your help! <SCRIPT LANGUAGE="JavaScript"> <!-- // by Nannette Thacker // http://www.s...
2013 Apr 05
2
model.frame: object is not a matrix
Over a decade ago there was a problem with model.frame when the variable names were long: https://stat.ethz.ch/pipermail/r-help/2002-August/024492.html I have similar symptoms with R 2.15.3 on Windows 7: Browse[2]> x <- model.matrix(formula(myform), p$data) Error in model.frame.default(object, data, xlev = xlev) (from mice.R#601) : object is not a matrix My attempt at a work-around did not help: Browse[2]> x <- model.matrix(formula(myform), as.matrix(p$data)) Error in model.frame.default(object, data, xlev = xlev) (from mice.R#601)...
2010 Mar 05
1
How to parse the arguments from a function call and evaluate them in a dataframe?
...function(formula, ftime, fstatus, data) { # step 1: obtain terms in `formula' from dataframe `data' # step 2: obtain ftime from `data' # step 3: obtain fstatus from `data' # step 4: do model estimation # step 5: return results } The user would call this function as: myfn(formula=myform, ftime=myftime, fstatus=myfstatus, data=mydata) Where `myform' is a formula object; and the terms in `myform', and the variables `myftime' and `myfstatus' should be obtained from the dataframe `mydata'. I am getting tripped up in trying to figure out how to do the seemingly si...
2018 May 01
4
issue with model.frame()
...rows for the dummy data set vname <- vector("character", 26) for (i in 1:26) vname[i] <- paste(rep(letters[1:i],2), collapse='')? # long variable names tdata <- data.frame(y=1:n, matrix(runif(n*26), nrow=n)) names(tdata) <- c('y', vname) # Use it in a formula myform <- paste("y ~ cbind(", paste(vname, collapse=", "), ")") mf <- model.frame(formula(myform), data=tdata) match(attr(terms(mf), "term.labels"), names(mf))?? # gives NA ---- In the user's case the function is ridge(x1, x2, ....) rather than cbind, b...
2007 Jul 03
2
"form_for" names fields using brackets = javascript problems
...fields with names like "forum[title]", i.e. using square brackets to denote attributes on model objects. Now, for the convenience of the user I want to do some simple client-side validation to check that some fields have been filled in. So I am trying to write javascript like "if (myForm.forum[title].value == '''') { return false; }", but ofcourse the "title" in the brackets is interpreted as the name of a child object of a "forum" object in the DOM for the page. Doh! Is there a way to solve this? I realize this is more a javascript que...
2008 Feb 13
0
Element.focusFirstElement() causing issue with Element.addMethods()
Prototype 1.6.0.2 Internet Explorer 7 I''ve found that when I call $(''myform'').focusFirstElement(); to set focus on the first field in my form, that this statement "wrecks" the extensions I''ve added using Element.addMethods() if it executes before Element.addMethods(). When I try to call one of my exenstions, the IE7 JavaScript interpreter throw...
2011 Jan 23
2
Passing in arguments into function
Hi, I had a function that looked like: diff <- lm(x ~ y + z) How can I pass the argument to the 'lm' function on the fly? E.g., if I pass it in as a string (e.g. "x ~ y + z"), then the lm function treats it as a string and not a proper argument. many thanks [[alternative HTML version deleted]]
2006 Jan 17
2
Specify ID for a form?
...use AJAX calls in order to refresh a particular page fragment using the form data. I have run into a stumbling block very early on in the process - how can I provide an ''id'' attribute to the form_remote_tag or start_form_tag methods? Specifying something like :id => ''myForm'' doesn''t appear to add an ID attribute in the generated HTML. Any help would be greatly appreciated! Thanks, Will -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/7f29d07c/attachment...
2005 Nov 17
1
afterFinish option not working as expected
...effect, but it''s not working as I expect it to. My function appears to be called just as the effect is starting, not when the BlindDown is complete (finished drawing). Here''s the code that I''m using for the most part... Effect.BlindDown( mydiv, { afterFinish:Form.enable(myform) } ) Any ideas? Thanks, Andrew
2006 Mar 09
6
[Prototype] Ajax.Request include form fields?
Hi, Is it possible to submit my form (or part of my form) with an ajax request? I had been using dojo to do this, but having just read up on the prototype library, I think I''d rather use prototype. The one thing I don''t see (maybe I''m just missing it) is the ability to submit my form (actually just parse through an element and include all inputs as request parameters)
2006 Apr 29
11
Multiple actions from one form - possible?
Hello * Obviously the rhtml below does not work, but it should be apparent what I try to achieve - I would like to give the user the choice to submit a form either to action1 or action2 but I cannot figure out how?! It would be great if someone could give some assistance. Thanks a lot, Alex <%= start_form_tag :action1 => ''save'', :action2 =>
2006 Aug 11
5
actionmailler corrupting emails
...#39;'> <div id=3D''main''> <p>Thank you for order with Alien8 Recordings. Below you will find a rec= eipt for your order.</p> <h2 id=3D"h2_artist">Order 59</h2> <div class=3D"mybox"> = <div class=3D"myform" style=3D"float:right; width: 50%;"> <h4>Shipping Info</h4> <div class=3D"myfield">234 6th Ave</div> <div class=3D"myfield">Suite 340</div> <div class=3D"myfield">New York</div> <...
2018 May 01
0
issue with model.frame()
...lt;- vector("character", 26) > for (i in 1:26) vname[i] <- paste(rep(letters[1:i],2), collapse='') # long variable names > > tdata <- data.frame(y=1:n, matrix(runif(n*26), nrow=n)) > names(tdata) <- c('y', vname) > > # Use it in a formula > myform <- paste("y ~ cbind(", paste(vname, collapse=", "), ")") > mf <- model.frame(formula(myform), data=tdata) > > match(attr(terms(mf), "term.labels"), names(mf)) # gives NA > > ---- > > In the user's case the function is ridge...
2008 Jun 18
1
Form submit listener not catching form.submit();
Event listener for a form being submitted is not catching an A tag with a submit in it. Example JS: $(form).observe(''submit'', function(e) { e.stop(); // Something }); Example HTML: <a href="#" onClick="myForm.submit();">Submit form</a> Any idea how to fix this without added more js to button? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send...
2018 May 01
1
[EXTERNAL] Re: issue with model.frame()
...r", 26) >> for (i in 1:26) vname[i] <- paste(rep(letters[1:i],2), collapse='') # long variable names >> >> tdata <- data.frame(y=1:n, matrix(runif(n*26), nrow=n)) >> names(tdata) <- c('y', vname) >> >> # Use it in a formula >> myform <- paste("y ~ cbind(", paste(vname, collapse=", "), ")") >> mf <- model.frame(formula(myform), data=tdata) >> >> match(attr(terms(mf), "term.labels"), names(mf)) # gives NA >> >> ---- >> >> In the user's c...
2005 Mar 25
4
ajax and clearing the form
Hi I played a little bit with rails+ajax, works fine... but how do I reset the form? I tried: --- <%= form_remote_tag(:html => {:name => ''form_update''}, :url => :url_new_item_with_ajax, :update => ''container'', :loading => "Toggle.display(''new-item''); $(''new-item-desc'').innerHTML =
2006 May 20
1
Slider.js - Attemting to put values in form.
...pt> <script type="text/javascript" src="js/scriptaculous.js"></script> </script> </head> <body> <h1>Sliders</h1> <h2>Slider with predefined values [2,4,6,8] and a non-default range [2,15]</h2> <form name="myform"> <input name="test" value="helloworld"> <div id="track3" style="width:200px;background-color:#aaa;height:5px;"> <div id="handle3" style="width:5px;height:10px;background-color:#f00;"> </div> </d...
2009 Oct 07
1
output validations errors form causing type error?
...is the following : TypeError in Store/orders#create Showing app/views/store/orders/new.html.erb where line #45 raised: can''t convert Array into String This is ocurring in the following view code: <% form_for :order, @order, :url => store_orders_url, :html => {:class => "myform"} do |order_form| %> <%= order_form.error_messages %> I can''t understand why this would be ocurring, because I was able to inspect the errors object for @order in the log, and it seems normal to me, I don''t know why it cause errors in outputting errors to the view...