Solved

identify when a url changes

Posted on 2013-11-22
8
197 Views
Last Modified: 2013-11-23
I load a login web page: https://docmein.com/app/page/12801944916418372/login into a frame. I do not have programming rights of this page. When a user successfully logs in, the page changes to: https://docmein.com/app/page/12801944916418372/secure/home. I would like to identify when the page changes so I can then load instructions in other frames. Is there a way to identify the new page? TIA
0
Comment
Question by:thenelson
  • 3
  • 3
  • 2
8 Comments
 
LVL 16

Expert Comment

by:HagayMandel
Comment Utility
If you do have programming rights on the second page (the one to which the loggedin user is directed to), then, you can check which page is the referer:
if ($_SERVER['HTTP_REFERER'] == "https://docmein.com/app/page/12801944916418372/secure/doLogin"){
  // Show (redirect to) the instructions page
}

Open in new window

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
What Hagay suggested should be fine as long as the page is from the same domain as the parent page.

If the loaded page is from another domain, then you cannot use javascript to reference the internals, because it would be a security violation (cross-domain scripting).

Cd&
0
 
LVL 39

Author Comment

by:thenelson
Comment Utility
I do not have programming rights on the second page and the page is not the same domain as the parent page.
0
 
LVL 16

Assisted Solution

by:HagayMandel
HagayMandel earned 250 total points
Comment Utility
In that case, you can't.
Any trick to bypass this obstacle requires knowledge of what privileges you do have. For example can you manipulate the .htaccess file? if so, you can force all traffic through a filtering page that checks, the referrer or the existence of a certain cookie and redirect the user accordingly.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
Comment Utility
If you are accessing a page that belongs to someone else the correct approach is to contact them and see if they have an API you can use, or work out a protocol you can use for access server side, and return the result from your own server.  

Trying to do what you want without the permission of the owner of the target page could be viewed as an attack, and in some jurisdiction might result in legal action.

Cd&
0
 
LVL 39

Author Comment

by:thenelson
Comment Utility
So there is no way to determine what page is being viewed in an iframe in a cross domain situation?

The reason I am try to do this is the website docmein.com is poorly designed so our patients are confused on how to accomplish what they need to do. For example, assume you want to schedule a new appointment and cancel an old appointment, what would you do at the page: https://docmein.com/app/page/12801944916418372.  I have explained this to my contact at docmein.com and made suggestions but got no response. So my next best solution is to provide instructions alongside the web page loaded in an iframe.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
If the owner of the target page is not willing to co-operate, then the best you can do is give instructions on how to fill out the form.  Generally a badly designed form lives a long time because instead of complaining people just find another place to do business; and site owners don't respond unless they get as lot of complaints because they think everything is just fine "the way they have always done it".

Sorry I don't have any real solution.

Cd&
0
 
LVL 39

Author Closing Comment

by:thenelson
Comment Utility
Oh well, not the answer I wanted but....
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 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

10 Experts available now in Live!

Get 1:1 Help Now