Announcement

Collapse
No announcement yet.

Passing parameters to a menu link

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing parameters to a menu link

    I have a horizontal menu that loads a number of apps in its iframe based on selections made.
    I have an app to be selected from the menu that starts up differently depending on the parameters passed to it.
    I need to have multiple menu items that call this same app but pass different parameters to it based on which menu item is selected.
    How do I get a menu item to pass a parameter to the app?

  • #2
    There's a menuevent onexecute where you can look at the selected value and do the necessary stuff like setting parameters. Best way I guess would be using globals.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Menu -> Event -> onExecute:

      Code:
      $item = {sc_menu_item};    
      
      switch($item)
      {
          case "item_9":
              // Customer
              [glo_CustomerID] = 2;
              break;
      
          case "item_10":
              // Customer
              [glo_CustomerID] = 99;
              break;
      
          case "item_22":
              // End, delete cookie
              [glo_DeleteCookie] = true;
              break;
      
          default: 
              // do nothing
      }
      Best regards: - Reinhard -

      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

      Comment


      • #4
        Thanks to both of you for the help.

        Comment

        Working...
        X