Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:23:30+00:00 2026-06-14T16:23:30+00:00

I have this HTML: <form action=mypage.php method=post onsubmit=return confirm(‘Are you sure you want to

  • 0

I have this HTML:

<form action="mypage.php" method="post"
   onsubmit="return confirm('Are you sure you want to submit this form? Submitting this form has serious consequences and you should definitely think long and hard before doing it.');">

I want to keep my code at or below 80 characters wide. How can I split this up into multiple lines while retaining the exact same functionality?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:23:31+00:00Added an answer on June 14, 2026 at 4:23 pm

    I’ld create a Javascript section that defines a function that you call from the form:

    <script type="text/javascript">
        function formSubmit() {
             return confirm('Are you sure you want to submit this form? Submitting' +
                            ' this form has serious consequences and you should ' +
                            'definitely think long and hard before doing it.');
        }
    </script>
    

    the form:

    <form action="mypage.php" method="post" onsubmit="formSubmit()">
    

    This gets your Javascript out of you HTML form and can be clearly broken where you like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have this HTML form saved as file-001.php : <form action=file-001.php method=post id=select-block class=general-form>
I have this html form echo <form name='delete_article_form.$row['id'].' action='sources/public/article_processor.php' method='POST' >; echo <input name='processor_switcher'
I have an html form that looks like this: <form name=form_ method=post id=contactUs action=myPage.aspx
I have a html form with the data by this post method 'form id='form1'
I have this simple form. a.php <html> <head> </head> <body> <? echo <form action
i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have this html form <form action=upload/ id=upload name=upload> // other form data </form>
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
I have this HTML dropdown: <form> <input type=text id=realtxt onkeyup=searchSel()> <select id=select name=basic-combo size=1>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.