473,508 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Ajax Updater

1 New Member
Expand|Select|Wrap|Line Numbers
  1. login: function(e){
  2. var pars = 'name=' + escape($F('name'));
  3. var myAjax = new Ajax.Updater('response', 'ajaxServer.php', {method: 'get', parameters: pars});
  4. // if response != ''
  5. this.deactivate
  6.  
  7.  
  8. },
  9. // Example of creating your own functionality once lightbox is initiated
  10. deactivate: function(){
  11. Element.remove($('lbContent'));
  12.  
  13. if (browser == "Internet Explorer"){
  14. this.setScroll(0,this.yPos);
  15. this.prepareIE("auto", "auto");
  16. this.hideSelects("visible");
  17. }
  18.  
  19. this.displayLightbox("none");
  20. }
  21.  
  22.  
  23. storeAddress.php
  24. ----------------
  25. function storeAddress() {
  26. $message = " ";
  27. // Check for an email address in the query string
  28. if( !isset($_GET['name']) ){
  29. // No email address provided
  30. }
  31. else {
  32. // Get email address from the query string
  33. $name = $_GET['name'];
  34. $pass = $_GET['pass'];
  35. if(($name == 'hello') && ($pass == 'hello'))
  36. $message = "";
  37. else
  38. $message = "".$name." + ". $pass.": An invalid email address was provided.";
  39.  
  40. }
  41. return $message;
  42.  
i am currently using prototype.js. what i wanted to achieve is when the username and password is valid then it will set the deactivate function. How can i achieve this ?
Mar 8 '07 #1
1 1368
acoder
16,027 Recognized Expert Moderator MVP
Check the response onSuccess.
Mar 2 '08 #2

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

Similar topics

1
3153
by: marc.fuehnen | last post by:
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> ...
2
4366
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
1797
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...
1
2606
by: gzerphey | last post by:
I hope you guys can help me on this. I have two functions. The first calls a periodical updater and does it quite successfully. The second is meant to stop said updater. It however fails when I...
25
2753
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...
1
1532
by: pankajit09 | last post by:
Hello, Is it possible to put two placeholders in Ajax Updater ? or Can I use the same placeholder(div ID ) at two places in HTML? var myAjax =...
1
1834
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...
1
2658
by: david | last post by:
First of all, small example: function GetURL() { new Ajax.Request('/updater.php?GetURL=yes', { method:'get', onSuccess: function(transport){ response = transport.responseText;...
8
3536
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
7223
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
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
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,...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
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
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.