How to get to open a page in current subdirectory in HTTPS environment

Posted on 2012-08-28
Last Modified: 2012-09-03
I have a script running in an HTTPS site and I am unable to figure out how to use to open a new page from the current subdirectory.  I've tried eveything to make the url appropriate, including hardcoding it.  All work in LOCALHOST which is not protected by HTTPS.  Here's a code snippet.  It sets the URL properly, but for some reason in the production HTTPS environment, it goes to the root directory and uses the parameters I give it, but with no page name.
//var urlscript = "http://" + + "/^a/mox_accuInventoryGrid";
  var urlscript = window.location.protocol + "//" + + "/^a/mox_accuInventoryGrid";
  //var urlscript = "^a/mox_accuInventoryGrid";
  var cb = Math.floor(Math.random()*3200);
  var parms = "?col="+col+
              "&row="+row+                      // MUST BE DEFINED IN SAME ORDER AS PARAMS COMING IN
              "&value="+value+                  // value of clicked on category, ie: SUN, IBM, ALLEN, etc
              "&category="+category+            // click on series (mfg, model, etc)
              "&series="+series+                    // mmmyyyy
              "&id="+id+                                 // DOM id of chart
              "&datelow="+datelow+              // filters low date
              "&datehigh="+datehigh+            // filters high date
              "&usermail="+usermail+            // filters high date
              "&cb="+cb;                        // cache buster must be last
  var url = urlscript+parms;
  alert("url-  "+url);
  var winopts = 'width='+screenwidth+',height='+screenheight+',left=0,top=0,scrollbars=1,menubar=0,toolbar=0,location=0,resizable=1,status=0,directories=0,copyhistory=0';,'_blank',winopts);

Open in new window

Question by:mamuscia
    LVL 44

    Expert Comment

    by:Rainer Jeschor
    the script should in general work regardless of HTTP / HTTPS.
    In what web server / framework do you host that site (source page where the script resides on)?
    How does the script get invoked / called?
    Any firewalls in between the browser and the web server?
    The special char "^" in the url might be blocked by some firewalls.

    LVL 17

    Expert Comment

    In the production environment do you have url rewriting going on in something like an apache .htaccess file or an iis filter or web config?

    Accepted Solution

    Sorry but I am removing this question from here as I have discovered that other pages open fine in this manner.  I believe I have an issue with the actual page that is opening and will be researching that to correct it.

    thanks for your interest and help.

    Author Closing Comment

    After further research it appears as though there are errors in the page being called, so the error was not that javascript had issues opening the window, but in the content of the window being opened.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now