removeParameter (XSPUrl - JavaScript)

Removes a query string parameter.

Defined in

XSPUrl (JavaScript)

Syntax

removeParameter(name:string) : void
Parameters Description
name The name of an existing parameter.

Example

This example sets parameters for a new URL then removes the last one.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var url : XSPUrl;

try {
	url = new XSPUrl("");
	url.setScheme("http");
	url.setHost("myhost.ibm.com");
	url.setPort(10038);
	url.setPath("/wps/PA_cow3tik/page1.xsp");
	url.setParameter("WP_BUSINESS_OBJECT_DATA", "rp0707test1");
	url.setParameter("WP_BUSINESS_OBJECT", "ejb/com/ibm/component/designer/ejb/DesignerComponent");
	url.setParameter("action", "openDocument");
	url.setParameter("database", "rp0707test1");
	url.setParameter("schema", "Schema_form1");
	url.setParameter("id", "3fb66696c9e31");
	url.setParameter("autoedit", "true");
	url.removeParameter("autoedit");
	p(url.toString());

} catch(e) {
	p("Error = " + e);
}

Print output from the example is as follows:

<<<http://myhost.ibm.com:10038/wps/PA_cow3tik/page1.xsp?WP_BUSINESS_OBJECT_DATA=rp0707test1&WP_BUSINESS_OBJECT=ejb%2Fcom%2Fibm%2Fcomponent%2Fdesigner%2Fejb%2FDesignerComponent&action=openDocument&database=rp0707test1&schema=Schema_form1&id=3fb66696c9e31>>>