Copying after running | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Copying after running

This happens on all submits. When I press run, and then I press submit, it displays just a copy of the code.

9th May 2017, 12:01 AM
mei
mei - avatar
8 Answers
+ 9
what language? what code? The program output area is down the bottom of the screen when using a phone.
9th May 2017, 12:28 AM
jay
jay - avatar
+ 7
calvin is awesome.. just thought i would say it..
10th May 2017, 12:53 AM
jay
jay - avatar
+ 4
Did you add any event for form submit?
9th May 2017, 12:24 AM
Calviղ
Calviղ - avatar
+ 4
What did you provide as url in the 'action' attribute of your <form> element submitted?
9th May 2017, 7:01 AM
visph
visph - avatar
+ 3
then you should use addEventListener to listen to submit event. Set the event preventDefault() to prevent default submission.
9th May 2017, 9:35 AM
Calviղ
Calviղ - avatar
+ 3
You need js code to do it... follow this code: <form id="form"> <input type="submit" /> </form> <script> var form=document.getElementById("form"); form.addEventListener("submit",function(e){ e.preventDefault(); alert("form submit detected by js") ; }, false); </script>
10th May 2017, 12:52 AM
Calviղ
Calviղ - avatar
+ 1
like this? <input type="submit" value="Convert" addEventListener = "preventDefault()"/>
9th May 2017, 11:47 PM
mei
mei - avatar
0
HTML; (How do you get to submit? I mean like when you type something it just comes out of the other <input>)
9th May 2017, 9:26 AM
mei
mei - avatar