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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:44:06+00:00 2026-05-23T15:44:06+00:00

I have a submit button for my form in my PHP file like below.

  • 0

I have a submit button for my form in my PHP file like below.

 <input type="submit" name="submit" value="submit" disabled="true" />

now i send an asynchronous request using a request object,

document.getElementById("username").onblur=function(){ 
username(this.value);
 };

function username(value)
{
request = createRequest();
if(request==null) {
alert("Unable to create request");
return;
}
var url= "sign_up.php?value=" +
escape(value);
request.open("GET",url,true);
request.onreadystatechange = displayDetails;
request.send(null);
}
function displayDetails() {
if (request.readyState == 4) {
if (request.status == 200) {
checked = document.getElementById("check");
checked.innerHTML = request.responseText;
document.getElementById("submit").disabled="false";
}
}
} 

here it basically is checking the availability of a username, now i enable the submit button,if a username enteres is available. But it really is not enabling the button. Can someone tell me why?

  • 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-23T15:44:06+00:00Added an answer on May 23, 2026 at 3:44 pm

    Get rid of the quotation marks, what you did was assigning a string “false” into the disabled attribute of the HTML element. Change the last line to this:

    document.getElementById("submit").disabled = false;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that contains an html file browse button ( <input type=file
<form> <input type='submit' name='btn1' value='btn1' onclick='javascript:return test()' /> </form> function test(){ $('#testDiv').dialog('open'); } Dialog
I have... a dynamic populated select box several input boxes a submit button form
I have a simple form: <form id=formTest name=formTest action= method=get> <input id=txtPostcode name=Postcode type=text
In my javascript file, I have a code snippet like: $('<form action=process.php method=POST>' +
I have the following working form: <div id=player_won> <form action=insert.php method=post> Firstname: <input type=text
Question: I have a form with a textbox, file browse(uploadify) and a submit button.
I have a form for uploading images. I'd like to disable the submit button,
I have a image button thats acts as a form submit button: <a href=#
I have a checkbox with id terms and a submit button in my form

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.