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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:21:11+00:00 2026-06-01T19:21:11+00:00

I’m creating a website page which has to different forms, depending on user input

  • 0

I’m creating a website page which has to different forms, depending on user input a different form is loaded.

When the page is loaded, The user is asked if they would like to register has a customer or a seller. depending on that choice I would the variable set to True or False a relevant form is loaded, so far I managed to get this much done but the page is only loading the background colour only nothing else(This started occurring when I started introduce JavaScript)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <title>Customer/Reseller</title>

    <link rel="stylesheet" type="text/css" href="styles.css" />

    <!--[if IE]>

    <style type="text/css">
    .clear {
      zoom: 1;
      display: block;
    }
    </style>
    <![endif]-->

</head>

<body>

    <div class="section" id="page"> <!-- Defining the #page section with the section tag -->

        <div class="header"> <!-- Defining the header section of the page with the appropriate tag -->

            <h2>G51 Villain Supply</h2>
            <h3>Delivering Technology  </h3>

            <div class="nav clear"> <!-- The nav link semantically marks your main site navigation -->
                <ul>
                    <li><a href="index.html"> Home </a></li>
                    <li><a href="about.html"> About </a></li>
                    <li><a href="products.html"> Products </a></li>
                    <li><a href="app.html"> Customer/Reseller </a></li>
                     <li><a href="private.html"> Private </a></li>
                </ul>
            </div>

        </div>

        <div class="section" id="articles"> <!-- A new section with the articles -->

            <!--start -->
            <div class="line"></div>  <!-- Dividing line -->
            <div class="article" > <!-- The new article tag. The id is supplied so it can be scrolled into view. -->
                <h2>Seller Section</h2>
                <div class="line"></div>
                <div class="articleBody clear">


        <form action="" method="seller">
            <fieldset>
                <legend>Seller Registration Form</legend>
                <br>Please complete </br>
                <br><label for="Fname">First Name:</label></br> <input type="text" name="name" id="name"/>
                <br><label for="Lname">Last Name:</label></br> <input type="text" name="name" id="name"/>
                <br><label for="Contact">Contact Number:</label></br> <input type="text" name="name" id="name"/>
                <br><label for="email">Email:</label></br> <input type="text" name="email" id="email" /> 
                <p></p><p></p>
                <p><label for="agree">&#160;</label> <input type="checkbox" name="agree" id="agree" /> The information I have provided above is accurate.</p>
                <p><label for="btnsubmit">&#160;</label><input type="submit" value="Register" name="btnsubmit" id="btnsubmit" /></p>
                <p></p>
            </fieldset>
        </form>                 
                </div>
            </div>

            <!-- end -->
        </div>

         <div class="section" id="articles"> <!-- A new section with the articles -->
            <!--start -->
            <div class="line"></div>  <!-- Dividing line -->

            <div class="article" > <!-- The new article tag. The id is supplied so it can be scrolled into view. -->
                <h2>Customers Section</h2>

                <div class="line"></div>
                <div class="articleBody clear">
        <form action="" method="cust">
            <fieldset>
                <legend>Customer Registration Form</legend>
                    <br>Please complete </br>
                    <br><label for="Fname">First Name:</label></br> <input type="text" name="name" id="name"/>
                    <br><label for="Lname">Last Name:</label></br> <input type="text" name="name" id="name"/>
                    <br><label for="FAdd">First Line Address:</label></br> <input type="text" name="1stAdd" id="name"/>
                    <br><label for="PstAdd">Postcode:</label></br> <input type="text" name="PstAdd" id="name"/>
                    <br><label for="Contact">Contact Number:</label></br> <input type="text" name="name" id="name"/>
                    <br><label for="email">Email:</label></br> <input type="text" name="email" id="email" /> 
                    <p></p><p></p>
                    <p><label for="agree">&#160;</label> <input type="checkbox" name="agree" id="agree" /> The information I have provided above is accurate.</p>
                    <p><label for="btnsubmit">&#160;</label><input type="submit" value="Register" name="btnsubmit" id="btnsubmit" /></p>
                    <p></p>
                </fieldset>
        </form>                 
                </div>
            </div>
            <!-- end -->
        </div>

  <div class="footer"> <!-- Marking the footer section -->
      <div class="line"></div>
       <p>Copyright 2012 - G51 Villain Supply </p> <!-- Change the copyright notice -->
       <a href="#" class="up">Go UP</a>
    </div>

</div> <!-- Closing the #page section -->

</body>

some blocks of the JavaScript is uncompleted since I don’t know how. please help, Thank you.

Edit:I replaced the above code with clean working one with out JavaScript.

  • 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-01T19:21:13+00:00Added an answer on June 1, 2026 at 7:21 pm

    Try this one, it’s working (tidied up and fixed) :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>
                Customer/Reseller
            </title>
            <link rel="stylesheet" type="text/css" href="styles.css" /><!--[if IE]>
    
        <style type="text/css">
        .clear {
          zoom: 1;
          display: block;
        }
        </style>
        <![endif]-->
        </head>
        <body>
            <div class="section" id="page">
                <!-- Defining the #page section with the section tag -->
                <div class="header">
                    <!-- Defining the header section of the page with the appropriate tag -->
                    <h2>
                        G51 Villain Supply
                    </h2>
                    <h3>
                        Delivering Technology
                    </h3>
                    <div class="nav clear">
                        <!-- The nav link semantically marks your main site navigation -->
                        <ul>
                            <li>
                                <a href="index.html">Home</a>
                            </li>
                            <li>
                                <a href="about.html">About</a>
                            </li>
                            <li>
                                <a href="products.html">Products</a>
                            </li>
                            <li>
                                <a href="app.html">Customer/Reseller</a>
                            </li>
                            <li>
                                <a href="private.html">Private</a>
                            </li>
                        </ul>
                    </div>
                </div><input type="button" value="I'm a customer" onclick="document.getElementById('customerz').style.visibility='visible';document.getElementById('sellerz').style.display='none';" />
                <input type="button" value="I'm a seller" onclick="document.getElementById('sellerz').style.visibility='visible';document.getElementById('customerz').style.visibility='none';">
                <div id="sellerz" style='visibility:hidden;'>
                    <div class="section" id="articles">
                        <!-- A new section with the articles -->
                        <!--start -->
                        <div class="line"></div><!-- Dividing line -->
                        <div class="article">
                            <!-- The new article tag. The id is supplied so it can be scrolled into view. -->
                            <h2>
                                Seller Section
                            </h2>
                            <div class="line"></div>
                            <div class="articleBody clear">
                                <form action="" method="seller">
                                    <fieldset>
                                        <legend>Seller Registration Form</legend><br />
                                        Please complete<br />
                                        <br />
                                        <label for="Fname">First Name:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="Lname">Last Name:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="Contact">Contact Number:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="email">Email:</label><br />
                                        <input type="text" name="email" id="email" />
                                        <p>
                                            <label for="agree">&nbsp;</label> <input type="checkbox" name="agree" id="agree" /> The information I have provided above is accurate.
                                        </p>
                                        <p>
                                            <label for="btnsubmit">&nbsp;</label><input type="submit" value="Register" name="btnsubmit" id="btnsubmit" />
                                        </p>
                                    </fieldset>
                                </form>
                            </div>
                        </div><!-- end -->
                    </div>
                </div>
                <div id="customerz" style='visibility:hidden;'>
                    <div class="section" id="articles">
                        <!-- A new section with the articles -->
                        <!--start -->
                        <div class="line"></div><!-- Dividing line -->
                        <div class="article">
                            <!-- The new article tag. The id is supplied so it can be scrolled into view. -->
                            <h2>
                                Customers Section
                            </h2>
                            <div class="line"></div>
                            <div class="articleBody clear">
                                <form action="" method="cust">
                                    <fieldset>
                                        <legend>Customer Registration Form</legend><br />
                                        Please complete<br />
                                        <br />
                                        <label for="Fname">First Name:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="Lname">Last Name:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="FAdd">First Line Address:</label><br />
                                        <input type="text" name="1stAdd" id="name" /><br />
                                        <label for="PstAdd">Postcode:</label><br />
                                        <input type="text" name="PstAdd" id="name" /><br />
                                        <label for="Contact">Contact Number:</label><br />
                                        <input type="text" name="name" id="name" /><br />
                                        <label for="email">Email:</label><br />
                                        <input type="text" name="email" id="email" />
                                        <p>
                                            <label for="agree">&nbsp;</label> <input type="checkbox" name="agree" id="agree" /> The information I have provided above is accurate.
                                        </p>
                                        <p>
                                            <label for="btnsubmit">&nbsp;</label><input type="submit" value="Register" name="btnsubmit" id="btnsubmit" />
                                        </p>
                                    </fieldset>
                                </form>
                            </div>
                        </div><!-- end -->
                    </div>
                </div>
                    <div class="footer">
                        <!-- Marking the footer section -->
                        <div class="line"></div>
                        <p>
                            Copyright 2012 - G51 Villain Supply
                        </p><!-- Change the copyright notice -->
                        <a href="#" class="up">Go UP</a>
                    </div>
                </div><!-- Closing the #page section -->
            </div>
        </body>
    </html>
    

    The JavaScript doing the trick :

    <input type="button" value="I'm a customer" onclick="document.getElementById('customerz').style.visibility='visible';document.getElementById('sellerz').style.display='none';" />
    <input type="button" value="I'm a seller" onclick="document.getElementById('sellerz').style.visibility='visible';document.getElementById('customerz').style.visibility='none';">
    

    What else…?

    Well, I just wrapped each section in a separate div : the customer section in customerz and the seller section in sellerz


    Have fun! 😉

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

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.