Displaying 20 results from an estimated 3000 matches similar to: "Pull down menus / Nested Javascripts"
2006 Apr 12
11
innerHTML and scripts not running
Hello,
I''m having an issue with getting embedded javascript code to actually
run when loaded via an Ajax.Request() call and the callback function
inserts the generated HTML and js code to my current page. It seems
that the javascript code is not properly parsing.
For example, I''m using the following function showinfo() to return
some html code.
function showInfo(go_url){
2009 May 13
4
Setting flash notice via javascript?
I am using a javascript to redirect to another action. Is there a way
to set the flash [:notice] in the javascript?
So when the javascript redirects, the new action/view picks up the
flash[:notice]?
(I suspect I may have to do something like url?notice=.....)
ideas?
thanks.
2005 Mar 25
4
ajax and clearing the form
Hi
I played a little bit with rails+ajax, works fine...
but how do I reset the form?
I tried:
---
<%= form_remote_tag(:html => {:name => ''form_update''},
:url => :url_new_item_with_ajax,
:update => ''container'',
:loading => "Toggle.display(''new-item''); $(''new-item-desc'').innerHTML =
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views":
<input type="button" onClick="newAlt()" value=" + "></nobr>
The JavaScript for "newAlt()" is:
// using DOM create new input box for alternate part
function newAlt() {
var html = "<input style=''background-color:#FFFFCC'' ";
html +=
2008 Feb 13
8
comparing ajax.updater div in js
This is really bugging me no matter what I''m trying.
In javascript, I''m using the ajax.updater, and it (obviously) writes
back out to a div. I want to then compare what was echoed out into
this div (which came from the php file I listed in ajax.updater) with
a string.
test should equal "SomeString" because that is what is being echoed
out to
2006 Jan 09
6
drag and drop problem
I am working on a resource planning problem. I like to use a nice drag
and drop interface for that. E.g. have a box of persons and a box of
projects, now I would like to assign a persom to project by dragging it
from the available resources box to a recieving project box.
I have studied the amazing drag and drop shopping card code listed here
http://demo.script.aculo.us/shop
What I need to
2009 Jul 24
6
Routes from raw js (using XMLHttpRequest)
I am making an ajax call from js to call a method (assocboxchange) in
my controller (AssociatesController), using XMLHttpRequest. I know
the XMLHttpRequest works fine because I use it in other places with
success. My problem is my URL I am using for this request doesn;t
access the method in my controller which I (think) I am specifying. I
am having it post to /channels/assocboxchange/" with
2019 Aug 07
8
samba-tool PTR with /16 network
Yes, offcourse, the 172.19 is a "bad" example.
I suggest we use the official RFC 1918 zones.
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
And for example 192.168.0.0/24 as extra, or people get confused. ;-)
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Rowland penny via samba
> Verzonden: woensdag 7
2006 Jul 06
2
link_to_remote method display a loading image?
Hey guys,
what would be the best way to incorporate this into the builtin
link_to_remote() method?
document.getElementById(''main'').innerHTML = ''<img
src="/images/loading_small.gif">'';
Id like for the item above to take place while the page is loading.
I''m currently doing this with another javascript but would prefer to
use rails.
2008 Jul 01
5
Attaching event observers to a series of elements - best practice?
Hi all,
New member here. I''ve been working with Prototype for a while, and I
love it. However, there''s one thing I still can''t figure out.
Let''s say I have an array of objects, representing contacts in an
address book:
var contacts = [
{ id: 1, firstName: "Bob", lastName: "Smith" },
{ id: 2, firstName: "Sue", lastName:
2010 Nov 08
1
API Google MAPS
Hello everybody,
I''m working with Version 3 of Google Maps JavaScript API, and I have
the next code:
In a layout of my application:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
2006 Jun 27
5
Ajax - Inserting selected elements from request.responseText
After retrieving a URL using an Ajax.Request...
function onComplete (request, json) {
// request.responseText holds the entire page
Only the content contained in elementID = ''source'' is intended for display
At this time, the following code works, but it disturbingly copies the
entire page from the source URL into the target DIV
$(''target'').innerHTML =
2006 Mar 15
2
Using form_remote_tag, setting the form name
I''m using form_remote_tag like this:
<%= form_remote_tag \
:update => "div_id_dataentry_bottom_ajax",
:loading => "document.getElementById(''wait'').innerHTML=''Loading...'';",
:url => { :action => "dataentry_bottom_edit" } %>
And it makes this code:
<form
2007 Sep 27
4
transportXML returns null?
Hi,
I want to load an XHTML file into DOM. I issue Ajax.Request and on
success do:
var response=transport.responseXML
Response is null. On the other hand:
var response=transport.responseText; // has the data.
Why is response=transport.responseXML returns null?
Here is the code:
function display() {
url = "http://" + location.hostname + port + "/fusion/
2007 Jul 10
6
Having trouble using data returned by Ajax.request
Hello everyone, I''m new here.
I''ve been working with prototype and plotr for about a month now, off
and on, and I have pretty much hit the wall on using the data returned
by Ajax.Request.
I''m using some php code to return a string:
{''foo'': [[0,0.0865334429075127], [1,0.0828179861705063],
[2,0.0828173042602942], [3,0.0841707718624196]]}
But I keep
2008 Aug 25
1
prototype.js Ajax is slow
So I was doing some experimenting with prototype and ajax and discovered
something interesting. When I use the first ajax call the response from
the server take 53ms. When I use the second on using the prototype
functions the request from the server is over 200ms. My question is
why, and can it be fixed?
<p><a href="#" onclick="serverSideAlert();">Call
2007 Apr 05
3
Trying to get drag and drop to revert when I want and stay at other times
Here''s the deal. I''m making an ajax-based chess game. It''s done but
there''s something I''d like changed. Right now, to move pieces, you
click on the piece you want and you click where you want the piece to
go. People expect that, but they also expect the ability to simply
drag and drop the piece. So I''ve been using the draggables and
droppables,
2007 Jun 07
4
Effect.Fade and innerHTML?
Hi there,
I''m now having an odd problem with Effect.Fade not working based on
the innerHTML of a div.
Take the following for example...
<div id="blah">
Nothing here yet.
</div>
If I then update "blah", hide it and then fade it in, like so:
<script type="text/javascript">
document.getElementById("blah").innerHTML =
2006 Jan 16
8
AJAX + Table.
Hello all.
I am trying ot load table rows using AJAX based on a search. The
following code results in:
1. Firefox renders correctly (Multiple rows inserted into page).
2. Opera renders the entire returned string in one <td> by the looks of
it (Bunched up under first header, the <> tags arne''t visible)
3. IE6 does nothing....great ;)
This is driving me nuts so any help
2007 Sep 17
5
Script.aculo.us effect queues & Ajax.Updater()
Hey guys,
I''m new here and just checked out Prototype with Script.aculo.us and
have to say it''s a great experience once you get the concept. However,
I''m not very experienced with JS so I''m a bit stuck on something I
think is quite easy to solve:
What already works:
A searchfield is observed by a DelayedObserver, a list of contacts is
updated vie Ajax updater.