Solved

Best way to design this page ?

Posted on 2004-10-29
200 Views
Last Modified: 2010-04-06
Hi

I need to create a page to do a specific task but I do not know if it is possible or which web development language would be best to use (I have a small amount of experience using ASP)

I am interested to hear from anyone with more experience than myself that could point me in the right direction.

The page needs to have 5 buttons along the top, clicking the buttons will populate a list type box on the left of the page with different information depending on the button clicked, the info is stored in an Access database.
Upon selecting a value from the list box another larger list box is displayed (filling the remainder of the page) with more detailed information from the Access database, clicking a value from this list box will open a new page with further detailed info.

I have used ASP and DSN connection-less (I think it's called) to connect to an Access database in the past but as this runs server side I don't think I can use it to do this new page.

I have considered the following ideas but not sure if they will work or if there is a better way ?

Using ASP - recursive page, the buttons would be a form, when button clicked the page is refreshed, if a value has been past back to the page then depending on this value use ASP to populate the list box, same idea when the list box is clicked to populate the main bigger list box.

Using Javascript 1 - Populate 5 list boxes using ASP, use javascript or forms to create 5 buttons, when clicked the buttons cause the relevant list box to be displayed (don't know how to get the 5 list boxes to be displayed in the same place on the page though), also cannot work out how to populate the main bigger list box.

Using Javascript 2 - Use javascript or forms to create 5 buttons, use Javascript to connect to database, use 1 list box that is populated depending on button clicked, use onclick of list box to run Javascript to populate main bigger list box.

I appreciate any advice you can give
0
Question by:duckp
    8 Comments
     
    LVL 4

    Accepted Solution

    by:
    I've used ASP to do exactly what you're looking for and it's worked very well.  

    Any ADO connection (DSN or DSN-less) always runs server-side in ASP.  DSN-less connection just means that the server doesn't need an ODBC DSN configured to connect to the database.  
    0
     
    LVL 2

    Assisted Solution

    by:phpisthefuture
    You can either use ASP and Access or PHP/MySQL, they will both work fine. If you have some ASP background, you can go ahead and start with ASP/Access.
    A great tutorials series for ASP:
    http://www.w3schools.com/asp/default.asp
    Tons of ASP scripts, most of them have GPL, so you can play with them.
    http://www.hotscripts.com/ASP/Scripts_and_Components/index.html
    After you start working on it, you can always ask questions about the code.
    Good luck and let us know if you have further questions.
    0
     
    LVL 7

    Expert Comment

    by:rohanbairat3
    I wouls use ASP. The design part .... I am more into .net so for my ASP pages I try to build the controllers to keep the display logic seperate.

    I would keep the display page seperate than the logic of accesing the dbase the controller page can be an asp where u provide different services to the display pages. Its easy ... jsut write an if then else loop and depending on the request serve them the output..

    -rohan
    0
     
    LVL 4

    Expert Comment

    by:rlibrandi
    You can do the if..then...else logic in straight ASP.  The code on the page gets pretty big, though.
    0
     
    LVL 7

    Expert Comment

    by:rohanbairat3
    I know dude thats the problem :) ... But I have developed seperate controllers for different operations and i delegate my tasks that way code is managable ... and easy for maintenance
    -rohan
    0
     

    Author Comment

    by:duckp
    Thanks for the comments but I'm still unsure how to tackle this project.

    Is it possible to populate different list boxes on a page using ASP depending on the click of a button ?

    Should the buttons be created using Javascript or form buttons ?

    Could you explain the controller page idea, sounds good but I don't understand how it works.

    Thanks

     
    0
     
    LVL 7

    Assisted Solution

    by:rohanbairat3
    Create those buttons as form buttons. On click of a button you can post back the form to itself and populate the list with asp ..

    here is one of the way to do it ...
    <%
     Set objConn = server.createobject("ADODB.Connection")
          Set objUserData = Server.CreateObject("ADODB.Recordset")
           objConn.ConnectionString =  "DSN=dsnanme;UID=username;PWD=password;"
          objConn.Open
    strSQL = "Select listitem FROM urtable group by listitem  order by listitem "

    %>
    <SELECT NAME="Comments" SIZE=3 MULTIPLE <%=disableCommentsBox%>>
           <%
                       If objUserData.EOF Then
             Else            
                  Do While Not objUserData.EOF
                    %>

                       <option value ="<%=objUserData("listitem ")%>">objUserData("listitem ")</option>
    <%
     objUserData.MoveNext
                Loop

             End If
    %>
    </SELECT>
    0
     
    LVL 7

    Expert Comment

    by:rohanbairat3
    The controller thing is ok ... dont worry about that too much .....


    you can put in the code i have written as a generic function. pass table name column name and list box name to it so it can create as many list boxes you want.


    So if a user clicks the Submit button send a request parameter or session parameter back ....  you can write a java script to do that too...

    -rohan
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Suggested Solutions

    There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
    It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    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…

    884 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

    18 Experts available now in Live!

    Get 1:1 Help Now