Michael Gerholdt [mailto:[EMAIL PROTECTED]] wrote:
> I'm using a nested repeater to build js dhtml menu from two 
> tables in MS
> SQL.
> 
> Two fold question:
> 
> 1) This looks like it is going to work well but is there a better way?

I have used, and do approve, the concept personally but to say what is
best does unfortunately require a bit more grasp of the browser types of
the audience etc. Any particular aspect bother you? Data structure? My
implementations for instance have used a single table with a column that
can be null (for a top level item) or that references another MenuItemID
as its parent if it is down level - this will allow for any number of
levels which is useful if you are doing a tree style  menu for example.

> 2) The submenus have a sequence column in the table, and the 
> js script I
> have to write has the items numbered as well. It doesn't 
> matter if I skip
> numbers for the js to work, but they do have to be in order. 
> I am using a SP
> to pull the data from the table, and can pull the sequence 
> number along with
> it, of course. However, I learned by trying that I cannot put 
> an 'order by'
> addendum to the Select statement in an SP.
> 
> Can someone tell me how to ensure that the menu items are 
> streamed to the
> html page in order?

You assuredly can use an order by clause in an sp in SQL Server. I would
try first using a standard table join as this method of filtering may be
causing the problem e.g. I would expect the following to work.

ALTER  proc GetSubs 
@ModuleName varchar(100)
As
select SubNavName, SubNavURL, MainNavID, Sequence
        from SubNav INNER JOIN MainNav ON 
        SubNav.MainNavID = MainNav.NavID
where MainNav.Module = @ModuleName
ORDER BY Sequence

HTH,
Cheers,
Iain
 
Disclaimer
This message may contain information which is legally privileged and/or
confidential.  If you are not the intended recipient, you are hereby
notified that any unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited.  Such notification not
withstanding, any comments or opinions expressed are those of the
originator, not of Taylor Made Computer Solutions, unless otherwise
explicitly stated.
 
 

---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to