Click here to Skip to main content
15,885,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have designed one website. It is simple html website. In my portfolio page I have given many links as list. When user will click on any one, the linked html page will be open. There is also one html file named bookmarks.html. I want to store the clicked link to my bookmarks.html file. How can I do this. Whenever use click on any portfolio link that should be stored into my bookmarks.html.. or is there any other way to do this...
I just want to store links to an html file. so that user can use it later also...
Posted

1 solution

You could use Google Analytics to track which links are clicked, but easier probably would be to use some kind of server-side code. Add some JavaScript to the onclick event of each link that calls a handler to record the link clicked, perhaps in a simple database - SQLite[^] would suffice. Then your bookmarks page could simply read the results from there.
 
Share this answer
 
Comments
Member 10279246 22-Aug-15 9:18am    
if is there any possibility with java query. I don't want to use database.. if you give code will be more helpful.. actually I just want temporary save... clicked link should be visible separate... file is not necessary...
Wombaticus 22-Aug-15 9:54am    
WHy would you want to use Java? It's not a good language for websites, as it requires a browser plugin to be enabled, and many peoiple don't like it.
If you mean Javascript, then no - it will be part of the solution, but not all of it. People are viewing your page in their browser on their machine, and you need to get the information back to your server and process it there, so some kind of server-side language, such as asp.net or php will be needed.
SQLite is a very lightweight databse solution that requires no installation - just a reference to the dll, and it stores data in files. That really would be your simplest way to go - acheiving what you want could be done with not much code at all. But no, I am not going to write it for you. You must try yourself, and ask for help if you get stuck on any specific points.
Member 10279246 24-Aug-15 2:34am    
Thanks dear... I will try.. thanks for the suggestions

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900