Displaying 20 results from an estimated 100 matches similar to: "Event.observe doesn't work"
2006 Mar 01
9
sortable tree?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi *,
I am new to this list, so please excuse me if this has been covered
before (unfortunately the search function at
http://www.ruby-forum.com/forum/10 is disabled at the moment).
If yes, then a pointer to a solution would be great.
I want to create a sortable tree with scriptaculous Sortable. There are
several categories and subcatgories:
cat_a
2006 Apr 24
1
dragdrop.js problems - workaround here
Hello, I am not sure how many people are using the shiny new tree
version of dragdrop.js - well it seems that someone arbitrarily
changed part of my implementation and has broken the functionality
with rails:
864 serialize: function(element) {
865 element = $(element);
866 var options = Object.extend(Sortable.options(element),
arguments[1] || {});
867 var name =
2007 Oct 12
5
Evalscripts
Hey all,
I''m just checking my understanding. Would someone be so kind as to
comment on the following?
Event.observe(''this_link'', ''click'', function() {
AJAX.Updater(''that_div'', ''my.php'', { evalscripts: true}) });
<div that_div>
</div>
///////
my.php
2005 Dec 14
1
Problem stopping default event in Safari
I''m going crazy here. I''m trying to stop a link from being followed
after it''s clicked. It works everywhere except Safari (using v. 2.0.2
on Tiger)
I''m using behavior.js to attach events based on a class or an id:
*******************************************************
function loadData(e) {
// load some data here based on the url of the a tag
2009 Nov 11
3
how to use # in a rd doc in url address
I am writing a rd doc, and need to use "#" in a url adress. This would make:
\url{http://www.xxxx.org/myfolder/#myanchor}
Of course, I suppose this will not work because # is a special character
starting a comment line in the rd dialect. I did not found a similar
example in "Writing R exentions". I am not sure bout using \dQuote{a
quotation}), and use \sQuote and \dQuote
2007 Oct 03
2
Scroll to anchor from RJS
Is there an way to tell the browser to scroll to a certain anchor from
an RJS template?
I''m doing a page update, adding stuff at the bottom and want to
browser to go there after it''s been added.
Thanks,
Helzer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2006 Nov 04
0
Prototype observe issues
I have tried a couple of different ways to do the following (using
unobtrusive javascript) as well as straight javascript. So far the
only way that I have been able to get it to work is through straight
javascript but still is not working the way that I would hope.
Basically I have the following in my application.js
var Myapp = {
myObserver: function(event) {
// links to adding a new
2006 Apr 28
0
Minimum needed to observe a model
I have a model called Post and a observer called PostObserver. I also
have in environment.rb file the line:
config.active_record.observers = :post_observer
I read that observers default to the model with the same name, but the
model class isn''t being observed.
Observe works if I put in the ForumController:
observer :post_observer
But this doesn''t seem right.
Jose
--
2006 Jun 28
2
Event.observe for href
Hello everyone,
I''d like to have an onclick triggered by a href, but since href''s
don''t have id''s, how do I use the Event.observe syntax with an href?
<a href="#" class="jQJSLink" />Click me!</a>
<script type="text/javascript" charset="utf-8">
2006 May 18
1
Event.observe problem
Hello there, i have a textbox, i fill the textbox with a date from a
javascript popup calendar, im using the like this
Event.observe(''myTextBoxId'', ''change'', function(){ alert(''epale!'');});
and is not working, if i put the alert inside the input element in the
onchange attribute it works, is that a prototype bug?
--
//
// Ing. Francisco
2006 Feb 10
1
Stopping an observe event
If I want to stop observing a div Is this the format?
Event.stopObserving($(''''mydiv''),''click'');
Deco
2006 Feb 10
0
Behaviour.js and prototype Event.observe
say I have some code like this:
Behaviour.register({
''#clickme'' : function(el) {
Event.observe(el, ''click'', function(event) {
alert("clickme was clicked");
});
}
});
Behaviour.apply();
Behaviour.apply();
the element with the id of ''clickme'' will now have 3 onclick event observers.
Is there a way to work around this?
I
2005 Oct 26
0
observe checkboxes
Hello,
I was wondering how I could solve the following problem.
I''ve a table with a list of checkboxes like:
"<table>
<tr><td><input id=''toggleSel[]'' type=''checkbox'' value='''' /></td></tr>
<tr><td><input id=''toggleSel[]'' type=''checkbox''
2007 Jun 28
1
base Event.Observe question
I would like to putting all of the onXXXX inside an
Event.observe(window, ''load''...)
When I click the button it would''t alert the mssage in FF but IE is
work?
I believe it is related to bind.....but I''m not really familiar with
this...so anyone can teach me how to do?
<script>
function hello(e){
alert(Event.element(e) + '' clicked'');
2007 May 24
0
IE6-7 Observe Document Oddity - mouseup
I''ve come to the recent need to know when the scrollbar has been grasped
and let go. However, I''ve worked my way into a corner using
Event.observe on the document (window wouldn''t work for me at all in
Internet Explorer 6 & 7).
Oddly enough, it works for mouse down... just not up.
I''ve attached a simple functional test file.
Expected Results:
2007 Dec 01
3
Event.observe and normal event
Hello!
I posted in another mail that I had a problem with this code:
paths.each(
function(img, i) {
this.imglist[i] = new Image();
this.imglist[i].src = img;
Event.observe(
this.imglist[i],
''onload'',
2006 Oct 20
1
Event.observe vs. element.onxxx =
What are the pros and cons of using Event.observe vs. element.onxxx =
somefunction ?
I noticed that a lot of sau code doesn''t use Event.observe. For example,
InPlaceEditor uses
this.form.onsubmit = this.onSubmit.bind(this);
In my code I''ve made a habit of using the equivalent (for example):
this.onSubmitListener = this.onSubmit.bind(this);
2006 Aug 31
2
Event.observe problem
Hi everyone!
I came across and interesting problem with prototype Event.observe.
Take this code for example:
<script type="text/javascript" src="cropper/lib/prototype.js"></script>
<script language="JavaScript"><!--
function handler(e) {
if (document.all) { e = window.event; }
var key;
if (document.layers) key = e.which;
if
2008 May 16
3
radio button observe field only triggers once
Hi,
If i add field observers to radio button fields they trigger once but
then nothing after that. I have multiple fields in a form that i need
to know if one of them changes and which spedific field. Below is an
example of two foelds i tested and they trigger once with the alert but
then nothing after that. I also tried individual observers for each
field test_yes and test_no but with the same
2006 Sep 30
3
Builder.node, each() and Event.observe - Help!
Hi all
I am trying to get the following code working but somehow it doesn''t..
Please help me.
------------ snip ---------
Ajax.Request(''/json/images/''+query, {
onComplete:function(xmlhttp,json)
{
if(json.TotalResults != 0) {
json.Item.each(function(item)
{
$(''out'').appendChild(