473,287 Members | 1,899 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,287 software developers and data experts.

Ajax.Updater doesn't work / scriptaculo.us

hi everybody,

tried the framework and build a little SQL Update, triggered by a JS
function:

<a href="javascript:updateData()"><img
src="../images/thumbs/thumb_blue.png" border="0" /></a>

<div id="yeah">

<?php foreach ($movies as $item => $value) { ?>

<?= $value['title'] ?>
<?= $value['playing'] ?>

<?php } ?>

</div>

<script type="text/javascript">

function updateData() {

var options = {
method : 'post',
postBody : 'id=1&value=44'
};

new Ajax.Request('update.php', options);

}

</script>

SQL Update is working (value changes from whatever to 44 in the
database). But the value in the DIV is not refreshing. I think I don't
know how to handle the Updater...

new Ajax.Updater('yeah', 'test.php', {asynchronous:true});

That's the way I have it now, but don't know

- where to put it ?
- whether I inserted the right URL (test.php is the DIV's page) ?
- whether I have to say new Ajax.Updater or just Ajax.Updater ?

I hope you can help me - the mini manual on scriptaculo.us says nothing
about it...

Thx, Marc

Jun 3 '06 #1
1 3139
Hi Marc,

Re your post below.

I think you might have better luck asking about prototype.js on the
rails-spinoffs mailing list which you can join

http://lists.rubyonrails.org/mailman...rails-spinoffs

If you do ask there, it might be a good idea not to send the
server-side document with php. Instead do a save as in the browser and
take the relevant parts of that html/javascript page to make an email
to the spinoffs list. The folks there may not know php.

If you are using php then you don't have the semi automatic connection
to prototype.js that a Ruby on Rails application has. Also a lot of
prototype.js is to simulate Ruby. Have you searched the archives here
to see how much many people dislike prototype.js? There are some good
reasons. Documentation is one.

Have you looked at the Yahoo! UI connection manager?

http://developer.yahoo.com/yui/connection/

Peter

ma**********@googlemail.com wrote:
hi everybody,

tried the framework and build a little SQL Update, triggered by a JS
function:

<a href="javascript:updateData()"><img
src="../images/thumbs/thumb_blue.png" border="0" /></a>

<div id="yeah">

<?php foreach ($movies as $item => $value) { ?>

<?= $value['title'] ?>
<?= $value['playing'] ?>

<?php } ?>

</div>

<script type="text/javascript">

function updateData() {

var options = {
method : 'post',
postBody : 'id=1&value=44'
};

new Ajax.Request('update.php', options);

}

</script>

SQL Update is working (value changes from whatever to 44 in the
database). But the value in the DIV is not refreshing. I think I don't
know how to handle the Updater...

new Ajax.Updater('yeah', 'test.php', {asynchronous:true});

That's the way I have it now, but don't know

- where to put it ?
- whether I inserted the right URL (test.php is the DIV's page) ?
- whether I have to say new Ajax.Updater or just Ajax.Updater ?

I hope you can help me - the mini manual on scriptaculo.us says nothing
about it...

Thx, Marc


Jun 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sgmaat | last post by:
I have create a AJAX webpage where if you press a link content is loaded into a div. NOw when this content is loaded no javascript is processed (i.e <Script>alert(..);</script>), but if the...
2
by: hardrock | last post by:
Hello! I'm working with the prototype library version 1.4.0 and having a strange error lately. When I want to make an Ajax.Updater call, it basically works. But as soon as I put the call into...
7
by: BeeRich | last post by:
Hi folks. I built an ajax.updater reply in a website on a Mac, and she works fine. It's a simple reply, the html supplied is correct, and I also supply the target DIV as well. Just wondering...
3
by: noballack | last post by:
I've got a problem, I'm working with Ajax in a web with a form with a list of checkbox added to the form via an Ajax.Updater method. These added checkboxs are not been sended by the form if I use...
25
by: meltedown | last post by:
This is supposed ot be an example: http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/ It says : This example is probably the simplest example you will ever...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
1
by: conspireagainst | last post by:
Is there any possible way (I'm using prototype framework) to glean what the name of the container element to be updated (using Ajax.Updater) is? I have appended at the bottom of prototype.js a...
8
by: luftikus143 | last post by:
Hi there, I recently upgraded to Firefox 3 and suddenly my Ajax.Updater doesn't work anymore. Firefox gives me a "Security Error"... I am using the recent versions of prototype and script.xx.us. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.