0

Is there a way to grab document library name from the URL using jquery? This ( How to obtain document library name from the URL ) is a good link but I need to use jquery

For example: https://Pros.Canada.ProSource.com/sites/CandidateSource/Campaign23/Forms/EditForms.aspx?ID=333223 (etc.)

There are two lookup up fields (Campaign and Campaign Number) on this page. Idea is to when recruiter go to this page, i want jquery to grab the campaign and campaign number from the url and stick it in the Campaign and Campaign Number box. so recruiter dont have to manually select these values.

Keyword: window.location.split

Community
  • 1
  • 1
Bob Dinero
  • 33
  • 2
  • 6

1 Answers1

0

Any example of the page?

Without a sample, I'd suggest doing something like:

$('a').each(function(){
     alert($(this).attr('href'));
});

Would really need to see the structure of your data do me sure where to go with that.

EDIT

You may be talking about getting request parameters ? http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html

Has a good tutorial on splitting out the window.location, I'm not sure about grabbing them it they're POSTed.

There's also a question here about reading $_POST how to get GET and POST variables with JQuery?

Community
  • 1
  • 1
Alex C
  • 15,904
  • 17
  • 64
  • 96