Displaying 2 results from an estimated 2 matches for "my_link".
2007 Aug 20
3
Contribution on extending createElement
...lways 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(my_anchor);
$(document_element).appendChild(my_div);
... I guess you see what I''m talking about !
Back a few months, I wrote a function that would do all that...
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_actio...