bill
|
| Posted: 01/25/2011, 11:42 PM |
|
I need to ensure that a page is only opened once
If user click on the page I would like to move focus to that opened page
|
|
|
 |
damian
Posts: 838
|
| Posted: 01/26/2011, 3:54 AM |
|
from your application you really dont have control of what a user does in his browser. i reckon you could probably do this by opening your page in a new named window and then if they try to open a second instance of that page it would open back in the named window... if a user clicks on a page havent they already changed their focus to that page?
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
ckroon
Posts: 869
|
| Posted: 01/26/2011, 8:55 AM |
|
Cant you put a session variable check on your Once Only page?
Set the session prior to getting to that page.. then once they leave it.. the session variable changes.. if they go back to that page it kicks them out.
_________________
Walter Kempees...you are dearly missed. |
 |
 |
CodeChargeMVP
Posts: 473
|
| Posted: 01/26/2011, 12:19 PM |
|
Maybe you could force than the open window stays on top and no way to go to the parent window, similar to that publicity pages than are open in the back, but this time you open the new window on front and force the user to do anything on this page or close it.
_________________
Best Regards
Entrepeneur | NT Consultant
|
 |
 |
damian
Posts: 838
|
| Posted: 01/26/2011, 3:47 PM |
|
Quote ckroon:
Cant you put a session variable check on your Once Only page?
Set the session prior to getting to that page.. then once they leave it.. the session variable changes.. if they go back to that page it kicks them out.
ahh - i was thinking that you wanted to pervent them having a page open twice - if you want to stop them opening a link more than once i would have an extra field (eg 'new') in the data table and on a BeforeShowPage event I would update the table to change this value to something that you can query on (eg 'no').
your original link could only show if there is a new record/entry for that user 'where new != no' or any similar variation....
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
JayEdgar
Posts: 77
|
| Posted: 02/10/2011, 8:41 AM |
|
I solve this by naming windows in javascript:
<script language="JavaScript" type="text/javascript">
window.name="contracts_add_payments";
</script>
then the code that opens windows should call the same window:
function JumpTo(Win,qString)
{
win = window.open(qString,Win);
win.focus();
}
Cheers,
Jay
|
 |
 |
AllanGilham
Posts: 1
|
| Posted: 02/10/2011, 3:34 PM |
|
I think that would just annoy the user 
[url=http://honestreview4u.com/satellite-direct]satellite direct[/url] | [url=http://honestreview4u.com/forex-automoney]forex automoney[/url]
|
 |
 |