Displaying 20 results from an estimated 507 matches for "onclick".
2005 Sep 18
3
Attaching effects during onload
I''m trying to attach effects to elements in my onload handler and my
lack of Javascript-fu is showing... I want to call the effect from
the onclick handler of an anchor inside the div I want the effect to
apply to. Here''s what I''m trying to do:
function doOnLoad() {
var filters = document.getElementsByName(''filter'');
for (var i = 0; i < filters.length; i++) {
var fil...
2006 Jan 16
11
Preventing bubble
I''m trying to prevent double ajax requests when I have nested onclick
handlers.
I have a table with clickable column headings (for sorting by that
column).
I have onclick handlers on both the <th> and the <a> link so that
clicking anywhere on the table heading should work.
<th onclick="window.location.href=''http://foo?sort=foo...
2005 Oct 18
0
RE: Error: "onclick() is not a function"
I see what he is saying now. When you assign a click event with the
Event.observe it does not allow you to call it with the
$(''xxx'').onclick(); command as it''s looking for the onclick tag in the a
tag.
I''m stumped on a way to get this to work.
Jon Whitcraft
Web Application Developer
Online Services - Indianapolis Motor Speedway
(317) 492-8623
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0IN...
2006 Jun 12
10
Cross Broswer Fire Event
Is there a standard way of programmatically firing an event on an
element? I think this code works in IE but not FF:
myElement.fireEvent(''onclick'');
I really only care about IE and FF, but anything else is a bonus. I
didn''t see anything in prototype/scriptaculous for this, but I might
have missed it. Thanks.
Joe Athman
==============================================================================
This communication, t...
2007 Jan 24
7
Differences between assert_tag and assert_select
Hi all,
I can't seem to make assert_select work for the more complex cases for me.
Here's a sample:
# View
<%= link_to_remote 'Add new', :url => new_phone_url, :submit => 'phones_head' %>
# Generated code:
<a href="#" onclick="new
Ajax.Request('http://test.host/admin/parties/phone/new',
{asynchronous:true, evalScripts:true,
parameters:Form.serialize('phones_head')}); return false;">Add new</a>
# Succeeds:
assert_tag :a, :attributes => {:onclick =>
Regexp.new(Regexp.escape(new_ph...
2006 Jun 24
4
Correct syntax for using the Effects Queue ?
this works:
onclick=''new Effect.Scale(this,50);''
but this does not:
onclick=''new Effect.Scale(this,50,{queue:front}); new Effect.Scale
(this,200,{queue:end});''
what is the correct syntax for using queue ?
many thanks as I have just started wrapping my head around scriptaculous...
2005 Oct 17
11
a better question
I''m trying to call a click() event on an <a href> that has an
Observable registered for it. Something like:
<a href="#" id="toggle_1929">show</a>
...
Event.observe("toggle_1929", ''click'', function(event){ Element.toggle
("group_1929"); return false; });
...
$("toggle_1929").click(); //this throws
2006 Jun 14
3
sortables and onClick events firing
I have a page that I have been tasked with adding sortable support to, and
the div elements that are being dragged have a <a href> in them with an
onClick handler that opens a new window with a preview. Is there a way to
keep that onCLick from firing when a sortable is dropped?
Sam D
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails...
2006 Feb 28
5
browser-crash with Ajax.Updater
...en I place the following code within
the loop my browser (FF) crashs:
<script>
var set_std_objekt = function (id) {
new Ajax.Updater(''divname'', ''/dosomestuff'', {
asynchronous:true,
evalScripts:true
})
}
</script>
<a href="#" onclick="set_std_objekt (1); return false;"><img...></a>
What''s wrong here ?
Instead when I include the "new Ajax.Updater..." in the
onclick-attribute then it works:
<a href="#" onclick="new Ajax.Updater....; return false;"><img......
2006 Mar 02
4
Instance variables in Javascript param
How can I make this work ?
<a href="#" onclick="new Effect.Fade(@div_id)"></a>
@div_id is an instance variable ?
TIA
--
Posted via http://www.ruby-forum.com/.
2006 Apr 13
3
Why won''t this work - simple helper text ??
Trying to print this out and it fails,
def cancel_toggle(element)
''<a href="#" onclick="new Effect.toggle("'' + element + ''","blind",
{duration: 0.4}); return false;" >Add a New Client</a>''
end
When called in my view like this:
<%= cancel_toggle "newClient" %>
It gets written to the browser but does n...
2009 Feb 17
1
How to show div with radio button onclick
...blem is that the div is dynamically named. I am using the
normal html for a radio button:
<input type="radio" name="edit_option" checked="checked"
value="this_appt">
Because observe field does not work well with radio buttons. I have
tried adding an onclick with the div id:
<input type="radio" name="edit_option" checked="checked"
value="this_appt" onclick =
"$(''edit_appt_frequency_#{@appt_to_edit.id}'').show()">
But the #{@appt_to_edit.id} does not get rendered and I have had a...
2006 Jul 10
2
inline javascript in partials
...nction <%=click_fn%> {
<%= do_before %>
Form.getInputs(''<%=form%>'', null, ''<%=mode%>'')[0].value = ''<%=button%>'';
<%= remote_function(remote_options) %>;
return false;
}
</script>
<% onclick ||= click_fn %>
<%= image_tag("/images/tfs/en-#{button}.png", {
:onclick => onclick,
:name => "submit_#{button}",
:width => "32px",
:height => "32px",
:onmouseover => "setStatusMessage(''#{button} files'');",
:o...
2006 Apr 16
3
AJAX multi actions?
How can I do something like this:
<a id=a7 style="cursor: pointer;"
onClick = "new Effect.Fade (''li'');
Element.show(''a1'',''a2'',''a3'',''a5'',''a6'');
onClick = "new Effect.Fade (''rp'');
Element.show(''a1'',''a2'...
2009 Aug 04
6
form_for
hi everybody...
I have a form_for in that, onclicking submit button i am calling
a javascript for validation.If validation fails that form_for doesnt do
anything.But even the validation fails it goes to the controller and
action.
here my code:
<%form_for :promotion_code,
:url=>{:controller=>"home",:action=>"create",...
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello:
I have radio buttons like this:
<% fields_for :goalhist do |g| %>
<table>
<tr>
<td align=left><%= radio_button_tag (''duedate'', 0, checked = false,
options = {:onclick => ""}) %>
Start now
</td>
</tr>
<tr id="detailed" style="display: none"><td colspan=2>
</td></tr>
<tr>
<td align=left><%= radio_button_tag (''duedate'', 1, checked = false,
op...
2013 Mar 06
2
Refresh a partial onClick using ajax call in rails 3.x
Hi All,
I want to refresh a partial onClick, onClick i am making ajax call
and getting the data but i am unable to refresh the partial. here is the
code
IN views: home.html.erb
$(document).ready(function() {
var currentCellText;
$(".inline").click(function() {
currentCellText = $(this).text();
$.ajax({
type: ''GET'...
2005 Dec 17
17
problems with quotes and escaping
...var newEvent=
"<div id=''item_"+theDate+"'' style=''display:none''>"+
" <div class=''msghead''><img src=''images/trash.gif''
class=''trash'' onclick=''new Effect.Fade(\''item_"+theDate+"\'',{duration:0.3
});''>"+theLongDate+"</div>"+
" <div class=''msg''>Something happens today</div>"+
"</div>";...
2008 Apr 30
5
Quick Submit Button Question...
...''
and one for ''full push''. I was thinking I could add some sort of param
to the button, but it''s not working... is there a way to do this? I have
this:
<%= submit_tag ''push to Exchange'', :name => "rad", :id => "0", :onclick
=> "doClick(this)" %>
<%= submit_tag ''force full push'', :name => "radtwo", :full => "full",
:onclick => "doClick(this)" %>
I tried to add param[:full], but it doesn''t work. Any suggestions?
Thanks,
- Jeff Mi...
2006 Jan 16
2
ruby embedded code replacement for onclick in link?
Is there a ruby embedded code replacement for something like this?
<a href="#" onclick="window.open(''http://192.168.78.12:3000/portfolio/show/<%=
item.id %>'', ''test'', ''width=660, height=500,resizable=no'')">
<%= image_tag item.image_url, :size => ''200x150'' %></a>
Thanks,
Dan
---...