Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- initComponent: function() {
- this.callParent();
- var queryString = {};
- var strurl;
- strurl = document.location.href.split('?');
- var tmp = strurl[1].split("&");
- for ( var i = 0; i < tmp.length; i++) {
- var pair = tmp[i].split("=");
- // If first entry with this name
- if (typeof queryString[pair[0]] === "undefined") {
- queryString[pair[0]] = pair[1];
- // If second entry with this name
- } else if (typeof queryString[pair[0]] === "string") {
- var arr = [ queryString[pair[0]], pair[1] ];
- queryString[pair[0]] = arr;
- // If third or later entry with this name
- } else {
- queryString[pair[0]].push(pair[1]);
- }
- }
- var extension;
- var agent_number;
- var agent_name;
- extension = queryString["extension"];
- agent_number = queryString["agent_number"];
- agent_name = queryString["name"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement