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 7622295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:24:55+00:00 2026-05-31T04:24:55+00:00

I have this submit button on my website. <form name=bbsform action=<?=$PHP_SELF?> method=post <input type=submit

  • 0

I have this submit button on my website.

<form name="bbsform" action="<?=$PHP_SELF?>" method="post"
<input type="submit" value="Submit" onclick="this.disabled=true,this.form.submit();" />
</form>

The onClick part disables the submit button immediately after the first click, to prevent possible double submission of the form. And it perfectly works.

And I also have made this javascript function, too. Let’s say it’s called ‘Guidance(bbsform)’.

Briefly, when a user forgot to complete one field in the form, it shows an alert message and focuses to the field.
(It work like that some invisible cursor is automatically clicking on the field, so the user can start typing right away.) This function works great too.

They both work great, well at least separately.

But when I combine them like this :

onclick="return Guidance(bbsform);this.disabled=true,this.form.submit();"

Only the Guidance function properly works.

Could you tell me what’s wrong with the code?

Thank you for reading. I’m a newbie to this whole programming thing, so please be generous 🙂

Here is the Guidance function. Sorry none of the solutions worked.. It’s really frustrating.

function Guidance(frm){

if(frm.subject.value == ""){

alert("Please complete the title field.");

frm.subject.focus();

return false;  }


try{ content.outputBodyHTML(); } catch(e){ }

 if(frm.content.value == ""){

    alert("Please complete the message field.");

frm.content.focus();    return false;  }
  • 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-05-31T04:24:57+00:00Added an answer on May 31, 2026 at 4:24 am

    Well you will have to also post the Guidance function, but i guess all you have to do is return the guidance function with a true:

    function Guidance(something){
        //do something
    
        return true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in my HTML form: <form action=cart.php method=post> <input type=hidden value=1
I have one image submit button like this <input id=enter name=enter type=image value=Login src=images/btn_login.jpg/>
<form action=mail.php method=post target=_blank> <textarea name=mess cols=50 rows=5></textarea> <input name=send type=submit value=Send> </form> After
I have a form, this form has a submit and a cancel button. when
I have this code: function submitTwice(f){ f.action = 'http://mydomain.com/threevideopage.php'; f.target='name'; f.submit(); } I left
I have this form: in header of my website: <% form_tag request.path, :method =>
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have situation like this: user submits form with action='/pay' in '/pay' I have
i have a form with 2 fields username: password: and a submit button. the
I navigated to a website with a form that has no submit button but

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.