I am using a regex snippet query string path

Posted by Shelby Poston on Stack Overflow See other posts from Stack Overflow or by Shelby Poston
Published on 2012-09-22T21:35:34Z Indexed on 2012/09/22 21:37 UTC
Read the original article Hit count: 208

Filed under:

Using the following to load images base on two ids one is the and bookid and the out is the client. My folder structures is this. root path = flipbooks

subfolders under flipbooks are books and clients

in subfolder books I have and .net page title tablet.

the tablet code behind checks the bookid of client and render a the tablet page with images in a flipbook fashion.

because we have over 15000 records and flipbooks already created and stored in the database. I don't move the client folder under the books subfolders. I need the code below to get to the client subfolder in the query string and help to change this would be helpful.

The result now is http://www.somewebsite.com/books/client/images/someimage1.jpg[^] I need the results to be http://www.somewebsite.com/client/images/someimage1.jpg[^].

I tried moving the tablet.aspx file to the root flipbooks and it works but i have provide a user name and password each time. This need to be access by the public and my root is protected. Don't want to have to change permission.

I am trying to remove the /books

function getParameterByName(name) {
var results = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
 return results ?
    decodeURIComponent(results[1].replace(/\+/g, ' '))
    : null;

} Thanks Mission Critical

© Stack Overflow or respective owner

Related posts about JavaScript