Displaying 11 results from an estimated 11 matches for "my_div".
Did you mean:
my_dir
2007 Aug 20
3
Contribution on extending createElement
Hi all,
I work a lot with scripts that modify the DOM, and I have always found
quite annoying that the code would always get very verbose as soon as
I wanted to create even simple structures :
var my_div = document.createElement(''div'');
var my_anchor = document.createElement(''a'');
my_anchor.setAttribute(''href'',my_link);
var my_text = document.createTextNode(''here is my link'');
my_anchor.appendChild(my_text);
my_div.appendChild(...
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value
of a javascript variable as an argument. Something like that:
link_to_remote "my_link",
:update => ''my_div'',
:url => { :action => "my_action", :var =>
''my_var'' }
Basically, ''my_var'' is a javascript variable which I want to pass to
''my_action''.
This, of course generates:
<a href="#&...
2008 Nov 22
3
RJS page.update question
How does page.update actually work? I know its a wrapper for
Prototype.update but how does it get the partial in there?
Say I wanted to update a div with the contents of a partial manually
like this.
content = render(:partial => ''whatever'')
page.call "$(''my_div'').update(#{content})"
But his does not work. It keeps giving me weird errors about
tags. Any clues?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups &...
2006 Aug 04
3
Using multiple controllers within the same page
I have a page that I want to use data from several tables. I wanted to
split these into their own div''s but I do not know how to access the
different part''s controllers. There are seperrate controllers because I
developed the parts seperately.
Has anyone done this?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Jan 12
1
Effect.Puff Problem - first frame is wrong size
...this one. Not much for
Javascript debugging, but found the Venkman tool and have been
stepping through the code trying to see where things go wrong. Looks
like it just might be a conflict with the style but lets give some
background.
I''m doing a ''Effect.Puff(''my_div'')'' on an onclick, and it''s
disappearing itself, i.e. the link is inside of the div in question.
Watching it closely though and it seems to do a quick jump to a new
size and then slowly do the rest of the effects.
Stepping through the code the issue occurs in the &...
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line.
page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5
It works fine if I have created the div with the
id="comment_error_details",
but if I haven''t created the error yet then my whole rjs template fails.
How can I check to see if an element has been created? I could then put
2006 Apr 12
1
link_to_remote with form values?
...''topics'', :rows => 6, :cols => 60 %>
and later a link_to_remote:
<%= link_to_remote("Hide",
{ :update => ''my div'',
:url => {:action => ''hide_textarea'', :div =>
''my_div,
:course => @course } ) %>
and I want to add the contents of the course_topics textarea as a field
in my :url hash.
Getting the form value with javascript should be possible, but how do I
embed that into the ruby code?
Thanks!
--
Posted via http://www.ruby-forum.com...
2006 Feb 16
1
Some questions about Ajax.Updater
Hi everyone,
I''ve been thinking of actually getting rid of the Rails javascript tag
helpers, and making calls to the prototype library directly from the
javascript functions that I made, however there are some bits that I
don''t quite seem to get...
Does this method block until it completes? As in, suppose I use it in a
block of javascript, will the code that''s
2007 Aug 23
0
Draggable on IE & Opera
Hi, all!
Have anybody problems with draggable in IE and Opera. The problem is
i''m creating simple draggable object like this:
new Draggable(my_div);
In firefox it works very fine. But in IE when I''m moving(dragging)
cursor div is stalling and drags very slow. and in Opera it keeping
tracks colored in color of the div.
Is reason in browser or there is the bug in framework?
--~--~---------~--~----~------------~-------~--~----~
You...
2006 Jul 20
5
Need HELP changing link_to_remote to a button
I would really appreciate some help with changing a link_to_remote call to a button of some sort. Here''s a little background.
On the page there are two <div>s. One is a form that lets the visitor enter items. The second <div> is where the entered items get displayed, each in it''s own item <div>.
Each item <div> has two <span>s. The first one
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi
I had ajax commenting on my app, which worked perfectly on Rails
v1.2.6, but does not work the same in Rails 2.02. Basically the
comment gets added, but the visual effects do not work (ie lines 2 + 3
of create.rjs)
create.js
page.insert_html :bottom, ''comments'', :partial => ''comment''
page.visual_effect :appear, "comment_#{@comment.id}"