开发者

Ajax form submit problem with refreshing

I have an ajax form for settings in my site. The user presses an img and then the ajax script calls a php file called set.php. In this file I have a form

<form method="post" action="users/set.php" enctype="multipart/form-data">

If the user updates something it is ok(I have meta to user.php, although the ajax form is reset). However if he presses the button then he is directed to the file users/set.php(something really bad)

I want a suggestion on how to fix this and another开发者_StackOverflow社区 one if I can send the queries without refreshing page(no jquery thank you)

Thank you


You can use JavaScripts preventDefault(), or not have an action at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜