[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread T.J. Crowder

Hi,

The code you included in your message isn't posting any forms; it must
be something else on the page.

Can you produce a minimalist, complete, stand-alone example of the
behavior?  (There's a template here[1] if you like.)  See Step 3 in
this troubleshooting tip[2] on the FAQ for details and rationale.

[1] http://proto-scripty.wikidot.com/self-contained-test-page
[2] http://proto-scripty.wikidot.com/faq#xyzprob

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Aug 13, 9:18 am, dpGoose cpzare...@googlemail.com wrote:
 Hi,

 I am using Axaj.Updater to retrieve a message from the server and it
 does do this but it also posts the form the Updater script and
 associated controls are contained in. I have followed the examples on
 the prototype site with modifications for my web server. Why is this
 happening? Here is the relevant code. This response is just a text
 message.

 script type=text/javascript
         function loadit()
         {
                 new Ajax.Updater( 'structureTree', 'Render?s=OrgConfigAjax',
                 {
                         method: 'get',
                         parameters:
                         {
                                 cmd: 'test'
                         }
                  });
         }
 /script
 button onclick=loadit();Click me/button
 div id=structureTreeLoading...
 /div
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread Alex McAuley

Can you explain it a bit better?

I dont quite understand what is going on


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: dpGoose cpzare...@googlemail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, August 13, 2009 9:18 AM
Subject: [Proto-Scripty] Using Ajax.Updater posts the contain form



 Hi,

 I am using Axaj.Updater to retrieve a message from the server and it
 does do this but it also posts the form the Updater script and
 associated controls are contained in. I have followed the examples on
 the prototype site with modifications for my web server. Why is this
 happening? Here is the relevant code. This response is just a text
 message.

 script type=text/javascript
 function loadit()
 {
 new Ajax.Updater( 'structureTree', 'Render?s=OrgConfigAjax',
 {
 method: 'get',
 parameters:
 {
 cmd: 'test'
 }
 });
 }
 /script
 button onclick=loadit();Click me/button
 div id=structureTreeLoading...
 /div

 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread Daniel Rubin

dpGoose wrote:
 Hi,
 
 I am using Axaj.Updater to retrieve a message from the server and it
 does do this but it also posts the form the Updater script and
 associated controls are contained in. I have followed the examples on
 the prototype site with modifications for my web server. Why is this
 happening? Here is the relevant code. This response is just a text
 message.
 
 script type=text/javascript
   function loadit()
   {
   new Ajax.Updater( 'structureTree', 'Render?s=OrgConfigAjax',
   {
   method: 'get',
   parameters:
   {
   cmd: 'test'
   }
});
   }
 /script
 button onclick=loadit();Click me/button
 div id=structureTreeLoading...
 /div
Hi,
you might want to try putting the attribute setting
type=button
in your button-tag.

I assume the snippet you posted is contained in a form, right?
Button-tags are type=submit by default, so clicking the button will
trigger both 'click' and 'submit' events.

Does this help?

Daniel


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Using Ajax.Updater posts the contain form

2009-08-13 Thread T.J. Crowder

 I assume the snippet you posted is contained in a form, right?
 Button-tags are type=submit by default...

Gah!  I read right past that.  Nice catch.

-- T.J.

On Aug 13, 1:21 pm, Daniel Rubin dru...@dimedis.de wrote:
 dpGoose wrote:
  Hi,

  I am using Axaj.Updater to retrieve a message from the server and it
  does do this but it also posts the form the Updater script and
  associated controls are contained in. I have followed the examples on
  the prototype site with modifications for my web server. Why is this
  happening? Here is the relevant code. This response is just a text
  message.

  script type=text/javascript
     function loadit()
     {
             new Ajax.Updater( 'structureTree', 'Render?s=OrgConfigAjax',
             {
                     method: 'get',
                     parameters:
                     {
                             cmd: 'test'
                     }
              });
     }
  /script
  button onclick=loadit();Click me/button
  div id=structureTreeLoading...
  /div

 Hi,
 you might want to try putting the attribute setting
     type=button
 in your button-tag.

 I assume the snippet you posted is contained in a form, right?
 Button-tags are type=submit by default, so clicking the button will
 trigger both 'click' and 'submit' events.

 Does this help?

 Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---