Jump to content

Recommended Posts

I understand completely how to submit a form with ajax, my question is, how do you get the page its supposed to post to, to appear like an actual form does.

Like im posting to 'boobs.php' in ajax i submit to boobs.php, but how do i get boobs.php to also be the resulting outcome, like an original form does?

The old school way or with prototype.

Link to comment
https://forums.phpfreaks.com/topic/241875-ajax-form/
Share on other sites

You want the page to change appearance after the form has been submitted? Is that your question?

 

The easiest way is to not bother using Ajax, done. If you still want to use Ajax you will need to (once the form has been submitted) remove the form from the DOM and replace it with whatever you want.

Link to comment
https://forums.phpfreaks.com/topic/241875-ajax-form/#findComment-1242135
Share on other sites

Ok that was a bad answer, i am definitely looking for a better one than (dont use ajax) in a fucking ajax forum... anyone?

 

Edit: actually that was an administrators answer..meh nevermind, ill figure it out myself or try another forum.

are you really that hostile to a forum that gives programming advice for free?  :headslap:

Link to comment
https://forums.phpfreaks.com/topic/241875-ajax-form/#findComment-1242538
Share on other sites

No, i solved the answer on my own, and it was involving forms in dynamically created objects.

 

post=function(){ 
var params="username="+document.getElementById('username').value+"&password="+document.getElementById('password').value+"";
new Ajax.Updater('LoadId', 'file.php', {
method:'post', parameters:params,evalScripts: true
});
}

Link to comment
https://forums.phpfreaks.com/topic/241875-ajax-form/#findComment-1242566
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.