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

  • Home
  • SEARCH
  • 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 8116707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:54:51+00:00 2026-06-06T03:54:51+00:00

I want to trigger an event with a button that changes the visibility of

  • 0

I want to trigger an event with a button that changes the visibility of a set of elements (inputs of type text and button) from hidden to visible. Now everytime I click on the triggering button, I want a new set of the same elements to appear on a new line. How can that be done? Here is a snippet of the code:

<script type="text/javascript">
function generatenew()
{
    document.add.property1.style.visibility="visible";
    document.add.button2.style.visibility="visible";
    document.add.button3.style.visibility="visible";
    document.add.button4.style.visibility="visible";
}
</script>
</head>
<body>
    <form name='add' method="post" action="">
    <div id="div"></div>
    <input type="button"  value="+Add" onclick="generatenew();"> 
    <input type="button" value="Edit" name="button2" style="visibility:hidden">
    <input type="text" style="visibility:hidden" size="50" name="property1" placeholder="<street> <city> <ZIP> <country> <lockunitID>">
    <input type="button" style="visibility:hidden" name="button3" value="open main door">
    <input type="button" style="visibility:hidden" name="button4" value="open apartment door">
    <div id="abc"><input type="button" value="save"></div>
  • 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-06T03:54:53+00:00Added an answer on June 6, 2026 at 3:54 am

    If I well understood your question, all you have to do is putting a function that is triggered by an onClick event, (element.onClick=function();) You put all your input type tags in the function, and then you end your function bay calling appendChild method so that each click triggers the display of your elements.

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

Sidebar

Related Questions

I want to trigger a button's enabled state, according to the type of the
I want to trigger on click of a button this: <asp:Button runat=server ID=submit Text=Submit
I want to set the UpdateSourceTrigger to an event of a control: <TextBox Text={Binding
How can I trigger a button click event using code in Android? I want
Short version: I want to trigger the Form_Load() event without making the form visible.
I have an event trigger that I want to be fired in response to
I came in to scenario that I want to trigger service on specific time.
I have a div, containing text and a few links. I want to trigger
I want Image button with two state(normal , mouse over). that button must change
I want to remove all rows that i entered from my SQLite database table.

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.