javascript help

Hi,   Right now I have a bunch of rhtml files with links in them that you can navigate through. For example, one file has these category links under the finance category:

Tax Bills Banks etc...

The user can click on Bills for example and he will get a view of more category links that fall under the category of Bills:

Non-Recurring Bills Recurring Bills

Until the user gets to a link for Gas and Electric Bills for example, which would link to the list view for the GEBill model that I have. I should mention that that these links are not part of any models that I've created. They are just simple rhtml files with a bunch of <% link_to ..%> lines.

My problem is how can I make it so that the user can add category links at any layer. And then within that new category, allow the user to make more new category links...

For example, the user should be able to add a link for Properties to the first list of links. Then once the user clicks on that he can add more links within the Properties.

Is this where prototype/script.aculo.us libraries come in? Does anybody know of any good tutorials that could perhaps start me off on the right track to solving this problem?

Thanks in advance.

Shyam Vijayakumar wrote:

Hi,   Right now I have a bunch of rhtml files with links in them that you can navigate through. For example, one file has these category links under the finance category:

Tax Bills Banks etc...

The user can click on Bills for example and he will get a view of more category links that fall under the category of Bills:

Non-Recurring Bills Recurring Bills

Until the user gets to a link for Gas and Electric Bills for example, which would link to the list view for the GEBill model that I have. I should mention that that these links are not part of any models that I've created. They are just simple rhtml files with a bunch of <% link_to ..%> lines.

My problem is how can I make it so that the user can add category links at any layer. And then within that new category, allow the user to make more new category links...

You should use a self-referecing table to create a hierarchy of the sections of your site. Otherwise is really complicated to allow the inclusion of other <%link_to %> line in your code pages. You should use a model for this.