+ 2

Is it possible?

Hello!! Please help!! I want to autimatically create a new column (td) con my table with new submited data. Something like: <td><a href = "folder/folder/NEWTOPICFOLDER">NEWTOPIC</a></td> Representing "NEWTOPIC" the new data submited by an ADDNEWTOPIC Button. Please help me!! I'drawning!!!

8th May 2020, 8:25 PM
Bombadil
7 odpowiedzi
+ 2
What have you tried , could you please show us?
8th May 2020, 8:29 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
as much as I could understand your doubly I hope it helps https://code.sololearn.com/WdRreb0KOKCK/?ref=app
8th May 2020, 9:02 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
The reason new data erases because you are just adding data to the page, using variables which are temporal storage.. if you want the data to retain you need to have a database where you can store the data.. If you are new at web programming, keep patience.. And complete the complete course of js and then look forward for SQL and php course from sololearn, or w3schools.com Or if you have any trusted source
8th May 2020, 9:27 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
Yes of course. Thank you for your replay! This is what I hace: <html> <head> <meta charset="UTF-8"> <title>Sobre Qué Quién</title> </head> <body> <p><table align="right" border="1"><tr><td>Qué dijo</td><td>Sobre</td></tr></p> <img src="Imagenes\olas recortadas.jpg" alt=".." width="100%" height="40%"/> <p align="left"> <strong>Sobre:</p> <p align="left"><table id = "temas"> <tr id="agregartema"> <td><a href="Temas/Amor"> Amor </a></td> <td width="30"></td> <td><a href="Temas/Frankenstein"> Frankenstein </a></td> <td width="30"></td> <td><a href="Temas/Pintura"> Pintura </a></td> <td width="30"></td> <td><a href="Temas/Zen"> Zen </a></td> <td width="30"></td> <td><a href="Temas/Samurais"> Samuráis </a></td> <td width="30"></td> <td><a href="Temas/Mujer(es)"> Mujer(es) </a></td> </tr> </table> Agregar contenido:</br></br> Sobre: <input type="text" name="sobre" id="sobre" /><br/><br/> <input type="button" value="Agregar" onclick="agregar();" /> var nuevotema = document.createElement("td"); var nuevotema = document.createElement("a") nuevotema.textContent = "Vida"; var list = document.getElementById("agregartema"); list.appendChild(nuevotema); </script> </body> </html> (I´m from Argentina. Ignore the spanish words)
8th May 2020, 8:34 PM
Bombadil
0
So basically what I want to do is add a <td><a href="Temas/NEWDATA"> NEWDATA </a></td> <td width="30"></td> column with a NEWDATA button. This meaning that it has to create a new href path for that specific NEWDATA. Maybe i´m expressing myself poorly. I´m sorry. I don´t even know if what I want to do is posible...
8th May 2020, 8:38 PM
Bombadil
0
That is great!!! I thank you a lot! I just changed de id of document.getElementById("tbl") to ("temas") because I wanted the new text on this other table. Now the only thing remaining is to make the href path take the same name as de new data in the button. Something like a.href="Temas/write.getElementById("sobre")" maybe? Never the less when I F5 the page the new data erases. So that´s a problem. Any way you helped me a lot!
8th May 2020, 9:21 PM
Bombadil
0
aaahh ok!! I am finishing Js and HTML courses but still nothing. I will follow your advise and be patient. Thank you!!
8th May 2020, 9:31 PM
Bombadil