easily make your html table content editable with jquery or javascript

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 75

  • @roul3688
    @roul3688 5 років тому +11

    I spent quite awhile looking for a free editable table. This is exactly what I was looking for. Thank you!

  • @xavier4313
    @xavier4313 2 місяці тому +1

    Love your enthusiasm mannnn😂...

  • @dungduong6566
    @dungduong6566 3 роки тому

    wow, you are master, this is really helpful, im vietnamese and i understand every single word you said! Thank you !

  • @sujitjustinebarwa
    @sujitjustinebarwa 4 роки тому

    It was very very useful Thank you very very very much !!!!

  • @mariocarrera5063
    @mariocarrera5063 4 роки тому

    it works, Thanks a lot for sharing your knowledges

  • @luffy4203
    @luffy4203 Рік тому

    does the changes also happen in database ?

  • @mythreyiramanan9045
    @mythreyiramanan9045 4 роки тому

    Hey mark,do u have the same concept done with plain javascript

    • @Codewithmark
      @Codewithmark  4 роки тому

      Unfortunately not because of the compatibility issues with different browsers...

  • @gilbertbigras6625
    @gilbertbigras6625 5 років тому

    Thanks. Very useful. I wonder about the random_id function: it is theoretically possible (but I admit with an infinitesimally small chance) that the generator provides the same id. Right? Would possibly need to store all generated id in a temporary array and check that each new one is not member of the array.

    • @Codewithmark
      @Codewithmark  5 років тому

      Hi Gilbert, depending on the scope of your project and how you are going to use the random id. But during my testing, I pushed it ids up to 100,000 and how duplications were found and it took up to 250 milliseconds. If you are interested in testing random id code to see if it work for you, I have a created a demo page for you : demo.codewithmark.com/2018-12-21-auto-id-check
      Hope this helps you....
      Happy Coding :-)

  • @baselplays8
    @baselplays8 Рік тому

    thanks i copyed your script but when i edit and save does not save on my hosting !

  • @rosecollins4929
    @rosecollins4929 6 років тому

    You might be my new favorite! Thank you!

  • @sandeepbhartiya7486
    @sandeepbhartiya7486 6 років тому +1

    can we save updated data on database

  • @DheaFadlia
    @DheaFadlia 6 місяців тому

    Wonder how to do this with reactjs

  • @kinansharif7055
    @kinansharif7055 7 років тому

    how could I implement it with using select2 jquery plugin ?
    thanks, Awesome tutorial.

  • @zahratdzair1630
    @zahratdzair1630 5 років тому

    hi, that was very useful, in my case I'm working on a list of choices for example the client choose t-shirt then he choose the type of material in a select list then he enter the number then after he finish i show a table filed with his choices when he can change the material or the quantity, i wonder how can I make one of the cells a select list, anyone can help , thank you so much

  • @chetannarvekar3539
    @chetannarvekar3539 5 років тому

    hi Mark, does this approach of dynamically creating the table content work if we have to generate a huge table? say around 10K records

    • @Codewithmark
      @Codewithmark  5 років тому +1

      Hi Nikhil,
      You can definitely do that.
      The only thing is that on the client side it might take a little while to load up the table depending on the visitors computer. Other than that, it definitely is possible.
      Happy Coding :-)

  • @phild1537
    @phild1537 6 років тому

    Great Tutorial ! Thanks a lot for sharing your knowledges.

  • @danishsharma7894
    @danishsharma7894 6 років тому

    Thanks it helped me lot in my comments

  • @ngauhunggame
    @ngauhunggame 4 роки тому

    it's great, thanks admin

  • @juanrincon6576
    @juanrincon6576 6 років тому

    I love this tutorial! Excelent dude!!

  • @yozmari
    @yozmari 7 років тому

    This is a great tutorial. Thank you so much!!!

  • @vishwassin
    @vishwassin 5 років тому

    Good work Mark! Thank you :)

  • @ashwinigaikwad7630
    @ashwinigaikwad7630 3 роки тому

    Can we save only one column value after editing.

    • @Codewithmark
      @Codewithmark  3 роки тому

      You sure can... I will be creating a new video soon...
      Happy Coding 😀

  • @Codewithmark
    @Codewithmark  3 роки тому

    😀 Subscribe: codewithmark.com/yt-subscribe
    Gift For You: codewithmark.com/gift

  • @fatimakhan7137
    @fatimakhan7137 5 років тому

    what syntax did you use?

  • @rohitsharma401
    @rohitsharma401 5 років тому

    your are asowm bro

  • @jaideepbanerjee616
    @jaideepbanerjee616 2 роки тому

    Hi Mark, great tutorial..Thanks. Slightly digressing from the topic. I have the value of ajax_data on my html file in a dictionary format (coming from MongoDB and my python program). On my html file I can access it via {{ajax_data}}. How do I pass this value into my document ready function? If there are any videos or tutorials pls share..would be of great help

  • @mohdarismail3391
    @mohdarismail3391 6 років тому

    Hii mark, nice work sifu (master), I am looking into you material as my reference

  • @johnyo4146
    @johnyo4146 2 роки тому

    thx

  • @karen1354
    @karen1354 6 років тому

    Sir what about if I'm going to get the data from my database and display it to the table, how? Thankyou sir, Im currently doing my Capstone project right now, and I would appreciate if you could help me thankyou .

    • @noah123180
      @noah123180 6 років тому

      If you have a Database (like MySQL) you need a backend API, from which you can request the data.

  • @deepitasaha195
    @deepitasaha195 6 років тому

    Thank you nice tutorial

  • @jonathanmartinez7557
    @jonathanmartinez7557 5 років тому

    lo amo senior desconocido

  • @EVisioNHD
    @EVisioNHD 6 років тому

    Hey mark i am using Materialize + mysql / php and i have an form wich i need to data be sended to a table like this and the table being editable can you help me ?

    • @Codewithmark
      @Codewithmark  6 років тому

      Hi Bodhi,
      What have you tried so far?

  • @cananard
    @cananard 6 років тому

    Excellent !

  • @jamalkhan8823
    @jamalkhan8823 5 років тому

    hey, how to add datepicker in table?

    • @nastycodes
      @nastycodes 5 років тому

      jsfiddle.net/qhtd3kw4/

  • @angelikamariae
    @angelikamariae 5 років тому

    Hi Mark
    I am totally new in Jquery and ajax. what I know how to do is to call my data using pdo and insert it into an html form.
    I have a PDO connection to a mssql database, I was wondering... what is the best practice to fetch the data since you are doing the form with jquery? is it from PHP and then calling the inside the foreach? or inside the tag using some code to call it using jquery? do you have any examples? What you do in the video is exactly what I needed, but now I have to insert my data there ... Thanks in advance.

  • @ninciared9054
    @ninciared9054 7 років тому

    Doesn't this save after refreshing? If it edits the source code it should?

    • @Codewithmark
      @Codewithmark  7 років тому

      Hi NinciaRed,
      Help me better understand how do you mean?
      If you are populating your table data on page load via Ajax’s call or simple php echo, then your users make the edits and you update your database via an ajax call. So, next time your page loads it will show the table data with the edits.
      For example, in the video I showed a table which had 4 column, if I edit “Last Name” cell of the first row from “With Mark” to “My Site” and your code updates the last name info via ajax call on your server.
      The next time I reload your page it will show “My Site” for last name cell of the first row.
      I hope this helps you
      Thanks
      Mark
      Happy Coding :-)

    • @ninciared9054
      @ninciared9054 7 років тому

      Let me explain, I need something like this but the data save in the source file until you edit it again. I need this without the use of MySQL. I tried playing around but I couldn' figure it out really. Thanks!

    • @Codewithmark
      @Codewithmark  7 років тому

      With the current technology that I know of, doesn’t allow your users to edit the source code file due to the web server and client computer security reasons.
      However, you can try to use client side storage (cookies or localstorage) option to save data and on page reload get the data from there.
      Here is a video training series on how to use localstorage (codewithmark.com/how-to-use-localstorage-like-a-boss) in case if you need help with that.
      Thanks
      Mark
      Happy Coding :-)

  • @spyros.lefkaditis2071
    @spyros.lefkaditis2071 2 роки тому

    does this data saty there if i close the window plz someone help me i want ot create editable table like this that when i change something and leave i see the change when load again the page can someone explain cause with js and html css i havent done it i cant find how i try use local sotrage but still i dont know
    ??

  • @massundarpichai8059
    @massundarpichai8059 4 роки тому

    how can i add and delete a row?

    • @Codewithmark
      @Codewithmark  4 роки тому

      This (codewithmark.com/easily-add-edit-and-delete-html-table-rows-or-cells-with-jquery) should help you out...

    • @massundarpichai8059
      @massundarpichai8059 4 роки тому

      @@Codewithmark thank you so much mark

  • @lawrencedelacruz4393
    @lawrencedelacruz4393 7 років тому

    Hii. Can you help me with my thesis? I use php and mysql db and i nees to create like that table but its a grading table.

    • @Codewithmark
      @Codewithmark  7 років тому

      Hi Lawrencr Thanks for asking the question... Help me better understand... You want to create html table with your data from mysql table. Is that correct?
      If so, are you familiar with jquery ajax function? As that will help you greatly. Here is a quick intro if you don't know it: www.w3schools.com/jquery/ajax_get.asp
      Basically you make an ajax call > your php > mysql table > get all the data you need and send it back to php > and php will send it back to jquery ajax.
      Once you have your mysql table data back in jquery, you can create a html table. Here is a quick video that might help you out: ua-cam.com/video/kcCYiA5mWDo/v-deo.html
      I hope this helps you...
      Happy Coding... :-)
      Mark

    • @lawrencedelacruz4393
      @lawrencedelacruz4393 7 років тому

      I'm not familiar yet with jquery. I only use bootstraps.

    • @lawrencedelacruz4393
      @lawrencedelacruz4393 7 років тому

      I have a table from mysql and print it in a php table form. Kinda like yours but its more on grading the students based on the criteria of the teacher.

    • @Codewithmark
      @Codewithmark  7 років тому

      Can you tell you what are the fields in your mysql table? That way I can create a step by step guide for you to follow to make it easier for you include in your project.....

    • @lawrencedelacruz4393
      @lawrencedelacruz4393 7 років тому

      Uhm, example activity 1, 2, 3,4. Seatwork 1,2,3,4. Long quiz 1,2,3,4. Exam 1,2,3,4. Like that but i need the result of that to print in the final field -> on the php table.

  • @rajshekar5315
    @rajshekar5315 5 років тому +2

    Hi Mark
    i have followed your code and i could able to edit the fields but whenever i refresh the page the data is getting erased.
    can you please add something about how to save the edited data back to database?

    • @David-iq1kd
      @David-iq1kd 4 роки тому

      ^ I would like to learn how to save back to a database as well.

  • @adeelrazaazeemi5585
    @adeelrazaazeemi5585 4 роки тому +1

    Great code; but with a lot of unnecessary sound effects.

  • @siddelaharsha8825
    @siddelaharsha8825 5 років тому

    How can you make fname not editable

    • @YATENDRA3192
      @YATENDRA3192 5 років тому

      Set contenteditable="false"

    • @siddelaharsha8825
      @siddelaharsha8825 5 років тому

      yatendra singh ranawat tried that It didn’t work

  • @imtiyazshaikh8587
    @imtiyazshaikh8587 6 років тому

    Please

  • @imtiyazshaikh8587
    @imtiyazshaikh8587 6 років тому

    Hindi me vedio banae

  • @khrazy5150
    @khrazy5150 6 років тому

    Jquery is dead bro! The same thing can be done better with Vue or Angular 😆.

    • @Codewithmark
      @Codewithmark  6 років тому +5

      Hi Keith,
      Based on my own experience, every tool has its own advantages and disadvantages depending on the project you are working on.
      Happy Coding... :-)