0
<form id="postnoticastoinvetors" name="postnoticastoinvetors" method="post" action="">
<div id="textopostagora" contentEditable="true" data-text="Publish Your news" spellcheck="true" aria-multiline="true" style="text-align:center;color:grey;line-weight:18px;margin-left:1%;margin-top:3%;margin-bottom:3%;width:98%;word-wrap:break-word;outline:none;margin-bottom:3%;" ></div>
<div id="welcome" style="display:none;z-index:1000;min-width:4%;min-height:3%;max-height:480px;top:25%;left:4%;position:relative;margin-bottom:20px;">
<img id="imagemn" src="" title="" style="max-width:92%;max-height:320px;border-radius:5px;"/><br>
<input type="file" id="arquivo" name="arquivo" />
<input type='hidden' name='o' id='o' value='1'/>
</div>
<div id="mes" class="mes" style="font-size:300px;"></div>
<hr id="hr" style="position:relative;"/>
<label id="label" title="Upload Images to Your Post" for="arquivo" style="opacity:0.5;z-index:10000;left:2%;position:relative;top:22%;width:5px;height:18px;text-align:center;" class="label">
<img id="camara" style="padding:2px;border-radius:2px;background:white;position:absolute;width:60%;height:80%;top:0%;left:10%;" src="http://empire-hq--nunoormaker21632223.codeanyapp.com/Signup/camara.ico" title="Upload Your Profile Image"/>
</label>
<label id="label22" title="Adiciona Emojis ao teu post" onclick="addemojis()" style="display:block;opacity:0.5;z-index:10000;left:14%;position:relative;top:0%;width:5px;height:18px;text-align:center;margin-top:-8.1%;" class="label"><img id="camara" style="padding:2px;border-radius:2px;background:white;position:absolute;width:60%;height:80%;top:0%;left:10%;" src="http://empire-hq--nunoormaker21632223.codeanyapp.com/Investor/em.png" title="Add an Emoji"/></label>
<label id="label23" title="Upload Images to Your Post" onclick="remoji()" style="display:none;opacity:0.5;z-index:10000;left:14%;position:relative;top:0%;width:5px;height:18px;text-align:center;margin-top:-8.1%;" class="label"><img id="camara" style="padding:2px;border-radius:2px;background:white;position:absolute;width:60%;height:80%;top:0%;left:10%;" src="http://empire-hq--nunoormaker21632223.codeanyapp.com/Investor/em.png" title="Add an Emoji"/></label>
<div id="displayemojis" style="display:none;">
<label onclick="adde()" >😀</label>
😁 😂 😃 😄 😅 😆 😇 😈 😉 😐 😑
😒 😓 😔 😕 😖 😗 😘 😙 😠 😡 😢 😣
😤 😥 😦 😧 😨 😩 😰 😱 😲 😳 😴 😵
😶 😷 😸 😹 🙀 🙁 🙂 🙃 🙄 🙅 🙆 🙇
🙈 🙉 🙐 🙑 🙒 🙓 🙔 🙕 🙖 🙗 🙘 🙙
🙠 🙡 🙢 🙣 🙤 🙥 🙦 🙧 🙨 🙩
</div>
<button type="submit" name="insert" id="insert" style="position:relative;left:80%;margin-top:0px;font-size:14px;font-family:Stencil, Helvetica;color:white;border:2px;background: #1d8fff;width:90px;height:25px;cursor:pointer;vertical-align: middle;border: 2px solid white;border-radius: 2%;margin-bottom:5px;outline:none;" class="botao98990020000189088yk8kkk8987698888kky8rf">hjgkjton</button>
<br></form>
<script>
jQuery(document).ready(function(){
jQuery('#postnoticastoinvetors').submit(function(){
var dados = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "http://empire-hq--nunoormaker21632223.codeanyapp.com/Investor/signpostmeufrontal.php",
data: dados,
success: function(strMessage){
$('#mes').append(strMessage);
}
});
return false;
});
});
</script>
In the
action=""
you have to put the page that will receive the data.– Sam
but I want to do without Reload, that is, with jquery and if I put the page in the action jquery does not work
– Pedro Ferreira
Then remove the attribute
action
tagform
.– Sam
I have done with the action tag without any value only that now does not execute
– Pedro Ferreira
and I’ve tried to take it out
– Pedro Ferreira
ok! to
action
You must call Ajax.– Sam
Something like
action="return funcao-do-ajax"
.– Sam
You must place Ajax inside a function that will be called when the form is submitted. Another thing, since the data will be loaded via Ajax, do not need to put the attribute
method="post"
in theform
.– Sam
already worked thanks
– Pedro Ferreira
I withdrew the post method and executed
– Pedro Ferreira
Ah, cool! Good luck!
– Sam