Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    6

    Problem with listbox

    I have a page with two listboxes. The data gets loaded from text files. According how you chose in the upper listbox, you will see different options in the listbox below.

    I want my users to click on the choices on the lower listbox and then they will get directed to the according page. So far, everything what i tried from what i have seen in this forum failed.

    Please kindly have a look on the attached programme. What is wrong? How can I the user jump by clicking on an item in the second listbox two the respective page?

    Thank you very much for all help. I am very much beginner level and I am completely clueless.
    Attached Files

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    ok, you have your code set out wrong,

    when useing a listbox its best done something like this

    Code:
    -- get the selected item
    cSel = ListBox.GetSelected("City");
    -- make sure that a item is selected
    if cSel then
    	-- get the selected item text, now the text is held in the var cSelText
    	cSelText = ListBox.GetItemText("City", cSel[1]);
    	-- compair the text and jump to the right page
    	if cSelText == "LMS" then
    	Page.Jump("Learning Managemen Systems");
    	elseif cSelText == "Weblogs" then
    	Page.Jump("demo_application_page");
    	-- add more here in the format
    	-- elseif cSelText == "item" then
    	-- Page.Jump("item_page");
    	end
    end
    also, you must refer to the exact page name

    heres your example with the above code in

    hope that helps
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    May 2007
    Posts
    6
    Thank you very much for your efforts and spending time in repairing the bugs in my code! It works wonderful now and the whole project is now succesfully completed.

Similar Threads

  1. Listbox problem
    By krayten in forum AutoPlay Media Studio 6.0
    Replies: 32
    Last Post: 07-09-2007, 03:57 AM
  2. Listbox and Input box problem
    By Training in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 10-25-2006, 09:43 AM
  3. Basic listbox problem
    By akkerfeld in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 04-27-2004, 07:42 PM
  4. Listbox Horizontal Scroll Problem
    By kpsmith in forum AutoPlay Media Studio 5.0
    Replies: 12
    Last Post: 02-11-2004, 09:52 AM
  5. Listbox indexing problem...
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 6
    Last Post: 01-28-2004, 08:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts