473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Can't seem to get scriptalicious AJAX Request to work

I'm having significant trouble getting the scriptalicious or dojo toolkits to work for me. For instance I'm trying to implement a simple blinddown in my page. If I were to do this:

<div id="listDiv" onclick="new Effect.BlindDown(this)">Show My Hidden Data</div>

it will work.

However if I try to move the effect like so:

<script type="text/javascript" language="javascript">
window.onload=function() {
document.getElementById("list").onclick = function(){new Effect.BlindDown(document.getElementById("listDiv" ));}
}
</script>

nada. Nothing happens. I am very confused and if anyone can help i would be much obliged!

-Jeff
Jun 23 '07 #1
4 1562
I'm having significant trouble getting the scriptalicious or dojo toolkits to work for me. For instance I'm trying to implement a simple blinddown in my page. If I were to do this:

<div id="listDiv" onclick="new Effect.BlindDown(this)">Show My Hidden Data</div>

it will work.

However if I try to move the effect like so:

<script type="text/javascript" language="javascript">
window.onload=function() {
document.getElementById("listDiv").onclick = function(){new Effect.BlindDown(document.getElementById("listDiv" ));}
}
</script>

nada. Nothing happens. I am very confused and if anyone can help i would be much obliged!

-Jeff
Sorry The non working code is like this:

<script type="text/javascript" language="javascript">
window.onload=function() {
document.getElementById("listDiv").onclick = function(){new Effect.BlindDown(document.getElementById("listDiv" ));}
}
</script>
Jun 23 '07 #2
<script type="text/javascript" language="JavaScript">
window.onload=function() {
$("list").onclick = function () {
new Ajax.Request('/servlet/ListAndDeleteBlogAjax?action=list', {method: 'get', onsucess: function(transport){$("listDiv").update(transport. responseText)}});
}
</script>

This doesn't seem to be able to do anything.

Am I using the Ajax.Request statement wrong?
Jun 23 '07 #3
pbmods
5,821 Expert 4TB
Heya, spargos.

Is your code generating an error, or is it just not working?

You don't need to wait until window.onload if you know when $('list') exists. You can call that code (or include the file) at the bottom of your page (or at least, anywhere after you define the element whose ID is 'list', though some versions of Internet Explorer will generate a bizarre error if you try to include it before the very end of your body).
Jun 23 '07 #4
acoder
16,027 Expert Mod 8TB
Merged threads.
Jun 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
5
by: Steve Wright | last post by:
I have an AJAX routine on a webpage that is working in IE6, but not IE7 or Firefox v2.0.0.2 The webpage is http://www.a-drop-in-the-ocean.co.uk/CWS/monitor10bins.php?quarry=401 The AJAX...
13
by: Marvin Zhang | last post by:
Hi, I'm not familiar with web programming, but I have a problem here. I have a page. When a user click one button on it, I will use AJAX to request a PHP script which will do a bunch of tasks,...
2
by: lggarrison | last post by:
I am brand new to .NET and I'm maintaining a website written in C# / .NET. Basically, I'm modifying some AJAX to send a press release through POST instead of GET because of the size limitations...
6
by: santhoskumara | last post by:
How to request to servlet from Ajax and also I got the DOM object in the servlet through Business Logic. Now how will i pass the DOM object from serlvet to Clientside. Where in the client Side i am...
3
by: Bodyloss | last post by:
Hey all Ive ran into a bit of a problem when trying to parse multiple lines of javascript whitch are returned from an ajax request. On the main page where the request orginates, i have a <div...
1
by: bizt | last post by:
Hi, I am having my first real attempt at an ajax class as so far Ive managed to build one that, once instatiated, will allow me to define which function it will call on completion then retrieves...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.