Displaying 20 results from an estimated 100000 matches similar to: "HTML::Selector syntax help"
2007 Oct 22
2
Form selector is not cross-browser consistent with label elements
I have found that Prototype does not select the same value based on
the $F form selector.
Consider this HTML snippet:
<label for="search">Your query<input name="q" value="" type="text"
id="search"></label>
Using $F(''search'') returns:
- ''''Your query" in Firefox 2
- "Your query"
2008 Apr 28
3
How to pass variable to $$()?
Hi all,
I want the $$() method to take the selector as an variable. See
below, I am trying to pass the class name as javascript variable so I
can write a generic function in my application but $$() returns
nothing for the following line
var currentHightLightGroup ="amountsFields";//This one comes as a
function parameter
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
I have a select_tag in my view that uses options_for_select with
multiple = true. I am having trouble figuring out the Rails way to
create and update that field. Please help.
Models:
-------------
Service has_many AccessControl
AccessControl belongs_to Service
application.rb
-------------------------
$types = Array["Athens", "htpasswd", "IP", "None",
2009 Apr 19
1
Overriding html generated for submit_tag and selected links
Hi,
Probably something simple, but I''m trying to change my submit_tag and
other buttons to CSS based buttons based on the article at
http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
Basically this needs the following HTML markup:
<a class="button" href="#"><span>Button Text</span></a>
So, the question is how can
2006 Oct 11
2
Help please with observe_form - not working
My observe_form is basically totally limp. I think it should update without
hitting submit button but even if I hit it , it doesn''t change (doesn''t seem
to post the data).
Can anyone please take a look and see if I"m doing something wrong. TIA
Form:
<% start_form_tag({:action => "livesearch"},
:id => "asearch") %>
2008 Apr 14
2
Problems with nil object
Hi to all. I''ve a very big problem. I know this can seem very loing, but
please, try to read it. I have a simply blog, with posts and their
comments. I''ve two tables in my db, posts, with post id, text and
comments_count to store the number of comments-children of each post (as
recomanded to do in AWDWR); and the table comments, with comment id,
post_id for the post
2007 Oct 04
2
Selector syntax error on Debian Etch
Hi all,
I''m having problems making some manifest work, and it''s so simple that I
don''t know where the issue is:
I get this error message when trying to load this vhost.pp file: "Could not
retrieve configuration: Syntax error at ''}'' in file
/etc/puppet/manifests/classes/vhost.pp at line 9"
define vhost ( $domain, $admin, $docroot, $enable )
2007 May 24
1
How do I show the selected values in options_for_select? Not as simple as it sounds.
How do I show the selected values in options_for_select? I have a
Service model and a AccessControl model. When a user edits a Service I
want the services access_controls to be pre-selected.
Models:
Service has_many AccessControls
AccessControl belongs_to Service
application.rb:
$types = Array["Athens", "htpasswd", "IP", "None", "Other",
2008 Jan 23
1
Adv. Rails Recipes - Problem w/ DRY forms
Hello.
I''m following the example in the Advanced Rails Recipes book for Keeping
Forms DRY and Flexible - #22.
I think the last little hurdle that I have is applying my CSS style to
the field labels.
This is in the partial for displaying the field
<p>
<span class="field_label">
<%= label %>
</span>
<span class="form_field">
2006 Sep 07
6
form_for - Child object - how to set parent id
Hi All,
I am just trying to learn ruby/rails so please don''t flame me if this is
a stupid question.
As a learning project I decided to create my own blog using ROR. I have
created a controller that shows paged blog entries, and below each blog
is a list of comments along with a form alowing the user to add a new
comment.
To create the form for the comment entry I used form_for
2006 Dec 14
1
Prototype CSS selector to descend tree?
Hi, I''m calling on those with Prototype/CSS selector foo to help with a
somewhat tricky issue.
I have a tree structure where each item is hierarchical. This is used
to manage software components. Think of the case where you''re
installing a piece of software, and want to customize which packages
are installed:
[ ] Internet
[ ] Email
[ ] Thunderbird
[ ]
2007 Jan 24
1
Removing empty class attribute from @template.content_tag
Hey all,
I have a quick question regarding the @template.content_tag methos when
creating a custom form builder.
Currently have the following method in my AccessibleBuilder class:
def datetime_select(field, options = {})
required = options.delete :required
label = options.delete :label
@template.content_tag("div",
@template.content_tag( "span", Example Label ) +
2007 Aug 05
0
Markaby syntax question
Hi,
I am just getting into Rails and I thought I''d try Markaby too.
I have a mab file with the following in it:
form_for :user do |form|
p do
label "First Name:", :for => "first_name"
form.text_field :first_name, :size => 40
end
(... cut similar)
submit_tag "Add User", :class => "submit"
end
2007 Nov 28
0
Prototype 1.6: Selector.matchElements Issue?
I haven''t been able to find any discussion about this. It looks as if
Selector.matchElements is broken (which means that
Selector.findElement, Element.down(elt, cssselector) dont work
properly.
What I''m seeing is that (line 3310) the Selector.findElements is not
called with the root node of the node you are wishing to find elements
under (its not called with a parameter at all)
2008 Apr 07
4
Staff Manager tutorial from "Prototype and script.aculo.us" by Christophe Porteneuve
Hi there,
Taking my first steps in Prototype and reading this very helpful book
by Christophe Porteneuve. There''s an interesting tutorial (Chpt. 7) on
making a tree to organize staff members. The problem is that I can''t
make it working in IE. In Firefox it works just great.
Did anybody fiddle with it? Maybe somebody has already figured it out.
IE says
2007 May 15
1
link_to_remote with :confirm...need syntax help
What is the syntax to use :confirm with link_to_remote? This doesn''t
work, I''ve tried a few permutations, with no success:
<%= link_to_remote( "X",
:update => ''address_list'',
:url => { :controller => ''addresses'', :action =>
''destroy'', :id => address },
2007 Apr 06
5
Getting a dynamically generated elements dimensions
Ive posted this before, but unfortunately I still have yet to resolve
it after numerous attempts...
Here is the overview: populate a container element with some new html
using Element.update and then retrieve the new dimensions of the
containig element.
Here is a bit of code snippet that I would think should work.. but
doesn''t:
==== start snippet ====
<style>
.bigBox {
2008 Sep 22
3
syntax error in RJS
I''m new to Ruby on Rails and came across a problem I could not solve
alone.
I''ve a pretty simple RJS file that looks like the following:
3.times do
page.insert_html :bottom, ''messages'', ''test''
end
page.call ''updateMessageWindow''
However this snippet gives a syntax error:
ActionView::TemplateError (compile error
D:/Eigene
2009 Jul 27
3
render syntax has me stumped
Hi,From within an action called manager within a controller called
storedorders, I want to render to the view for the manger action of
controller orders.
It really seems like the following syntax should work:
(within the StoredordersController manager method...)
respond_to do |format|
format.html {render :controller => ''orders'', :action =>
2013 Oct 23
2
how is mongoid syntax implemented ?
In mongoid, a ORM mapped database object is like below. The part "type:
String" seems to me to not fit into any standard ruby syntax and I was
curious how does mongoid implement that ?
class Step
include Mongoid::Document
field :Label, type: String
field :Descript, type: String
field :ErrorText, type: String
embedded_in :step_data
end
--
You received this message