Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    May 2010
    Posts
    323
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Can you add rows with html table without using javascript?

    Can it be done that each time you click submit, it will add a row without using jquery or javascript?

  2. #2
    Master Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    5,821
    Thanks
    26
    Thanked 605 Times in 598 Posts
    yes .
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  3. #3
    Registered User
    Join Date
    Jun 2010
    Location
    UK
    Posts
    258
    Thanks
    33
    Thanked 14 Times in 14 Posts
    You could use PHP to add the row as required and manipulate the data and HTML as you choose.

  4. #4
    Regular Coder
    Join Date
    May 2010
    Posts
    323
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Dormilich View Post
    yes .
    Can you kindly give an idea how to do it? Session should also not be used.

  5. #5
    Master Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    5,821
    Thanks
    26
    Thanked 605 Times in 598 Posts
    see post #3
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  6. #6
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,301
    Thanks
    7
    Thanked 1,360 Times in 1,329 Posts
    Come on, people! Be a little friendlier and at least provide some example or a link to an example.

  7. #7
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,427
    Thanks
    4
    Thanked 488 Times in 476 Posts
    This would be a LOT easier to "provide some example" if we could see the table, understand why rows are being added, and what the submit is doing.

    Though yeah, these answers seem just a bit too snarky to the point of being outright dismissive and beginner hostile; and that's saying something coming from me.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com

  8. #8
    Supreme Master coder!
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    10,378
    Thanks
    10
    Thanked 1,190 Times in 1,180 Posts
    And tell us why javascripting cannot be used.

    You say HTML table, so I think you mean using the <table> tag. You want to add rows to a <table> without using javascripting, and you are OK (or perhaps not OK) with having a page refresh? And what happens after that? All of this ... repeating what Deathshadow asked. I'm pretty sure you'll be using javascripting along with PHP.

  9. #9
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,301
    Thanks
    7
    Thanked 1,360 Times in 1,329 Posts
    What’s wrong with a page refresh after clicking a submit button? That’s what a submit button naturally does; and the question was pretty clear. Click a submit button and add a table row without using JS – I can only applaud the OP for this decision. In any case, JS could still be added afterwards to enhance usability if the need arises.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •