Getting Parameters

<< Click to Display Table of Contents >>

Navigation:  Snippets >

Getting Parameters

Previous pageReturn to chapter overviewNext page

An easy way to get parameters into the Javascript is via the URL.


A typical URL could look like this








In your script (at the start or in an onready function) do the following


        var inputparameter =;

        if( inputparameter === "") { xui.alert("No Site Defined! - Refresh with Site in URL");  }

        if( inputparameter === "param" ) { xui.alert("input = "+inputparameter); another_function_call_1;   }


If you have loads of input options you could use a switch




         case "param":



         case "another":





The parameter we want to get starts at position 4.