Capture, then paste URL string in browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CoffeeCup
    New Member
    • Oct 2011
    • 1

    Capture, then paste URL string in browser

    Gentlefolk;

    I am working with a learning management system with a penchant to rewrite code. To get around this, I want to place my content _outside_ of the LMS, but on the LMS server.

    I can link to this external content easily enough, but because of single signon, I can't return to the originating page.

    So I need some JavaScript to do two things:

    1: capture the URL of the originating page and save that to a cookie. The URL can be quite long, for example:

    http://learncenter.myc ompany.com/learncenter.asp ?sessionid=3-942000C3-9A31-4869-8C78-3F42CBFF484E&DC T=1&id=123456&p age=125

    2: Return that URL to the address bar when a "Return" or similar button is clicked.

    I have tweaked JavaScript sourced from the web, but have limited experience cobbling together this type of code myself, so I have an idea of what I need to do, but not a great idea of how to actually do it.

    I would appreciate any guidance. If there is another way to accomplish this, other than writing a cookie, I am open to any ideas. I am just trying to return the user back to the originating page with the single signon credentials intact.

    Thank you!

    Don
Working...