Solved

identify when a url changes

Posted on 2013-11-22
8
200 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
ID: 39669037
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
ID: 39669364
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
ID: 39670243
I do not have programming rights on the second page and the page is not the same domain as the parent page.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 16

Assisted Solution

by:HagayMandel
HagayMandel earned 250 total points
ID: 39670276
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
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 39670594
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
ID: 39671889
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
ID: 39672038
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
ID: 39672113
Oh well, not the answer I wanted but....
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
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 …

770 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