Solved

Add links to pagle dynamically?

Posted on 2007-03-27
5
148 Views
Last Modified: 2010-04-09
I currently have an ultra simple html page that contains some links to some of my favourite sites. I put the links in manually via the html source.
What I would like to do is add the links from the page itself. i.e.
Have a couple of text boxes, one for the title, one for the url and a button to add it to the list.
I click the button and it is then shown in the list on that page.
What is the easiest way to do this?
How do I do it?
Thanks for any help.
0
Comment
Question by:RickJ
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
jawahar_prasad earned 125 total points
ID: 18798936
Hi...

Step 1:
You  need to create a page with the your text boxes(for title, url and submit button)

Step 2:
In the form action, call the server side page(may be asp or php or jsp page which ever you use) which will update the database with these values

Step 3:
You must query the database and display these links in the page where you want.


PLEASE NOTE:
You cannot do this with Javascript( in the client side) as this is temporary...
If you want it to be permanent you must use server side scripting...
0
 
LVL 8

Author Comment

by:RickJ
ID: 18798978
Do I have to use a "real" database for this?
Can I just read a text file for the links?
Can you provide any code examples?
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18806076
Hi..
You can very well use text file...

Which server side scripting you are using???

The complete tutorial on how to create, read files:
IN ASP:
http://www.w3schools.com/asp/asp_ref_file.asp

IN PHP:
http://www.w3schools.com/php/php_file.asp

Other tutorials:::
In asp:
http://www.brainjar.com/asp/fileops/
http://support.microsoft.com/kb/300982

in PHP:
http://www.phpnerds.com/article/reading-and-writing-files
0
 
LVL 8

Author Comment

by:RickJ
ID: 18828242
Hello jawahar_prasad,
"Which server side scripting you are using???"
None, I was hoping to be able to do this client side, obviously not possible. The pages I have are some simple html files not running under any server.
I will most likely use asp, I have most of my experience with this.
Thanks for all your help. The file handling links are a great help.

Rick.
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18828906
cool. ok. thank you.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap on PLNKR 3 29
HTML Display Current Year 5 26
Browser Chrome downloads colored link 5 41
Select case on click 3 16
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question