I need to create an onClick() event and need some help. I need to somehow extract a portion of my URL, which will then be used as the new URL when the user clicks on a button.
So if the existing URL = "http://website/folder/Ticket.aspx?Job=http://website.com/estimating/object/Job/detail/1111" and I want to extract the 2nd portion (
http://website.com/estimating/object/Job/detail/1111) and then go there...
I'm having trouble figuring out a way to parse out that parameter. I've tried to use split with no avail - I get an error that it isn't allowed:
var page = parent.location;
var newpage = page.split("=")[1];
window.location.href = newpage;
I'm stuck. Any suggestions?