| 1:51 pm on Apr 14, 2010 (gmt 0)|
Welcome to WebmasterWorld!
2. Where is the element "emailSent" located? If it's within a form element, then that will cause a problem because you'd end up with a form within a form, which is not valid, and clicking the paypal button might cause the outer form to be submitted (which is probably why you get redirected to your own server). So make sure that emailSent is not located within a form element.
| 3:16 pm on Apr 14, 2010 (gmt 0)|
Unfortunately this is not the problem :(
I do call sendMaul() from within the first form but the div is placed outside the form.. But it certainly calls the action of the first form since I changed the action url and redirected me there..
| 3:28 pm on Apr 14, 2010 (gmt 0)|
rereading your post, I may be on the wrong path.
Does your code work, if it is not AJAXed in?
| 3:56 pm on Apr 14, 2010 (gmt 0)|
XtendScott not sure if I understand your question.
The sequence is as follows:
In myurl.php I display a paypal button which is actually a second form. When I click the paypal button the action of the first form is executed.
I tend to believe that it is impossible to have the paypal button/form in the second site because as soon as it is displayed we are back in the client side so naturally the action of the first form will be executed.
| 5:55 pm on Apr 14, 2010 (gmt 0)|
|But it certainly calls the action of the first form since I changed the action url and redirected me there.. |
That would tend to suggest that perhaps you have some invalid markup that is causing the browser to think that you're still in the form.
For an experiment, can you try putting your "emailSent" element immediately after the <body> tag (so it appears before the form element)? For example:
Also, you might try validating your HTML [validator.w3.org].
| 5:56 pm on Apr 14, 2010 (gmt 0)|
Also, is the result of myurl.php ONLY the new <form>...</form> element, or does it contain an entire page with <html>, <head>, and <body> tags?