## #StackBounty: #url #query-string #parameter Source Querystring Parameter

### Bounty: 50

I am trying to use the Source QueryString Parameter once the user makes changes to the Edit Form.

Here’s the Source URL I am using:

https://mysite/sites/hhc/finance/ap/Lists/APInvoiceForm/EditForm.aspx?ID=76&Source=/sites/hhc/finance/ap/


I paste it into the URL, hit enter, and it will work the first time when you press save, but every other time after, it defaults back.

Is this not possible to use with the Edit Form?

Get this bounty!!!

### Bounty: 50

I’m trying to copy a forum thread with this directory structure:

The first page has a URL like this:

https://some.site.com/foo/bar/threadNumber


And the rest of the pages follow this format:

https://some.site.com/foo/bar/threadNumber/page/2


I’m using the command:

wget --recursive --page-requisites --adjust-extension --no-parent --convert-links https://some.site.com/foo/bar/threadNumber


This command can copy any single URL just fine. However, I want to put in the higher directory, and get all of the /page/* files as well. I want no higher directories, and nothing other than the lower /page/ files. I have also thrown --mirror into the mix with no success.

Any ideas why this command isn’t going any lower to download the rest of the pages?

Get this bounty!!!

### Bounty: 50

I’m trying to copy a forum thread with this directory structure:

The first page has a URL like this:

https://some.site.com/foo/bar/threadNumber


And the rest of the pages follow this format:

https://some.site.com/foo/bar/threadNumber/page/2


I’m using the command:

wget --recursive --page-requisites --adjust-extension --no-parent --convert-links https://some.site.com/foo/bar/threadNumber


This command can copy any single URL just fine. However, I want to put in the higher directory, and get all of the /page/* files as well. I want no higher directories, and nothing other than the lower /page/ files. I have also thrown --mirror into the mix with no success.

Any ideas why this command isn’t going any lower to download the rest of the pages?

Get this bounty!!!

### Bounty: 50

I’m trying to copy a forum thread with this directory structure:

The first page has a URL like this:

https://some.site.com/foo/bar/threadNumber


And the rest of the pages follow this format:

https://some.site.com/foo/bar/threadNumber/page/2


I’m using the command:

wget --recursive --page-requisites --adjust-extension --no-parent --convert-links https://some.site.com/foo/bar/threadNumber


This command can copy any single URL just fine. However, I want to put in the higher directory, and get all of the /page/* files as well. I want no higher directories, and nothing other than the lower /page/ files. I have also thrown --mirror into the mix with no success.

Any ideas why this command isn’t going any lower to download the rest of the pages?

Get this bounty!!!

## Fetch GET parameters in JS/jQuery

If you have a URL with some GET parameters as follows:

www.test.com/t.html?a=1&b=3&c=m2-m3-m4-m5 

and need to get the values of each parameters then below is a nifty piece of code solving your requirement.

JavaScript has nothing built in for handling query string parameters.

You could access location.search, which would give you from the ? character on to the end of the URL or the start of the fragment identifier (#foo), whichever comes first.

You can then access QueryString.c

Below is the code to download the complete contents of a URL to your local hard drive.

//IMPORTS
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.io.File;

METHOD CODE

String fileName="Path\to\File.extn";//The file that will be saved on your computer

ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[2048];
int n = 0;
while (-1 != (n = in.read(buf))) {
out.write(buf, 0, n);
System.out.print("|");//Progress Indicator
}
out.close();
in.close();
byte[] response = out.toByteArray();

FileOutputStream fos = new FileOutputStream(fileName);
fos.write(response);
fos.close();
}