Solved

Add links to pagle dynamically?

Posted on 2007-03-27
5
146 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now