Hi Jeremy,
Keep with the client side event for trying to solve this.
As some extra info, have on 1st page your field and make it a hidden field as you don't need to display anything to the user. You can change fields from hidden to regular text to see what is going into the field while testing. You have called it $(JobID). Just to cover our bases here for passing the value to another page let me say that in the advanced field options check the setting to' Pass values of this question to session variable:'. Then on the second page you will want another field with the same short name of $(JobID). On that page you need to receive the value with the setting in advanced field by clicking the 'Retrieve values from session variable for this question:'. This is how you get value from one page to the next.
Now I question your javascript is working for the following: "$document.referrer.toLowerCase().replace('.aspx','').split('jobid/')[1];" as it seems to get what you are grabbing into a lower case when you put it into the field you are calling $(JobID). But you say that you can't get 10 to go to the $(JobId) field you are making. That tells me you may be having trouble stripping the 10 out of the url of "
http://www.domain.com/Open-Position...id/10.aspx" target="_blank" rel="nofollow">
http://www.domain.com/Open-Position...id/10.aspx" with that javascript because the javascript itself is wrong. If you want the 10 to come out of the "
http://www.domain.com/Open-Position...id/10.aspx" target="_blank" rel="nofollow">
http://www.domain.com/Open-Position...id/10.aspx" wouldn't you need to use something like var = window.location.href to first get the URL into a variable and then find the substring of the variable to get to the 10? Once you have the value then setting it to $(JobId) should display.
But the Client Side Script box is the right place to make this happen.
Thanks