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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:08:42+00:00 2026-06-18T10:08:42+00:00

I have a php app, that has been pieced together, but I am working

  • 0

I have a php app, that has been pieced together, but I am working on an crazy validation piece, that i’ve got working. At the end of the validation, the following function runs and gives me a popup with the listed of required fields.

function showReqFlds(emptyFlds) {
    for (var i = 0; i < emptyFlds.length; i++) {
    var holdErrMsgs = emptyFlds[i]+' is required.' + "\n";

    }
        alert(holdErrMsgs);
}

Works great, but now I want instead of the javascript popup box, I want the error messages to appear in a fieldset at the top of my form.

Steps:

User opens form, error fieldset is not displaying
User clicks the submit button to submit form, but has not filled in a couple of the required fields
Error fieldset appears, shows required field list, form is not submitted.

Any assistance would be appreciate. Thank you.

  • 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-18T10:08:43+00:00Added an answer on June 18, 2026 at 10:08 am

    Just think about this:

    function changeText(text)
    {
    elem = document.getElementById('error_message');
    elem.innerHTML = text;
    }
    

    And you have in your html page this:

     <div id='error_message'>I'm a error message</div>      
     <button onclick="changeText('error1');">error1</button>
     <button onclick="changeText('error2');">error2</button>
    

    With something like this you should do the trick.

    Saludos.

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

Sidebar

Related Questions

So I have an app that has a MySQL, PHP login..it was working great
We have a C# app that has been working on three machines, 2 running
I've got a very old php application (1999) that has been worked on during
I have an application that has been working with session variables no problem. I
i have a project i took over. it is an app that has been
I have a PHP app that creates a CSV file which is forced to
I have a simple PHP app that prints 'hello world'. When I run it
I have a legacy PHP/MySQL app that calls mysql_connect(). Tons of existing downstream code
If I have in my php app an object that connects to the database,
I have written a small chat app that uses mysql + php to facilitate

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.