i took a ready script from here, How to read GET data from a URL using JavaScript? and can't make it work, what im doing wrong? here is my script:
function getUrlParam(param)
{
param = param.replace(/([\[\](){}*?+^$.\\|])/g, "\\$1");
var regex = new RegExp("[?&]" + param + "=([^&#]*)");
var url = decodeURIComponent(window.location.href);
var match = regex.exec(url);
return match ? match[1] : "";
}
var param = getUrlParam("process_number");
alert(param);
and here is my link:
http://erp.micae.com/index.cfm?fuseaction=objects.popup_print_files&process_number=SER-498&action_type=141&action_id=289&action_row_id=32&print_type=192
thx for the help!
Sorry guys, forgot to mantion that my page is working in a frame, that why it can't get the data from url i want :)