This forum is now read-only. Please use our new forums at discuss.codecademy.com.

About You Forum

View Course » View Exercise

664 points
Ec582d7d1ed0319e20999f46459957a0?s=140&d=retro
Submitted by
Milad
almost 4 years ago

I am trying make something happen when someone presses submit

I am trying make something happen when someone presses submit

how does it work


0 votes

permalink

I think you need to you the prompt or confirm from javascript.
so you would need to study java a little bit for that.

108 points
5304e12d282ae3676500297c_237312026
Submitted by
TheChampion42
almost 4 years ago


0 votes

permalink

my code that I did the same thing you want to do looks like this in the body:

p>Why hello there I REALLY like Woodworking and Legos.
input type="email" placeholder="email">
button onclick="myFunction()">

108 points
5304e12d282ae3676500297c_237312026
Submitted by
TheChampion42
almost 4 years ago


0 votes

permalink

whoops I forgot that this is in the head:
head>
script>
function myFunction(submit)
{
alert("are you sure you want to give this website your email?");
}
/script>

108 points
5304e12d282ae3676500297c_237312026
Submitted by
TheChampion42
almost 4 years ago