• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Disabling browser /sub window buttons....

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.How can i disable the close and the resize icons on the top right corner
of a sub-window opened from a JavaScript function like this :
function XXXX()
{
var winRef=window.open("ABC.jsp","windowName","window features..");
}
2. How do i prevent the user from using the main browser back and forward button
(To view the previous and next page) without physically disabling them.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
goto http://www10.brinkster.com/a1ien51/
look at the back button page and the resize page and look at the link below for my pop up window generator
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is no way to disable the X it the title bar thank god! why do people want to do this anyway. would you like it if a site you went to popped up windows you couldnt close? how about it they popped up thousands of windows like that and caused you puter to crash?
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ian for the reference.I will get back to U soonest.
Hi Randall , i have a button on the sub-window
which serves as close icon(x) and i have attached some logic in the function called by this button , it also refreshes the parent window with some DB extract when clicked by user.
I thought it was possible to disable some/all
browser buttons using JavaScript. I am interested in this code if any.
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you cant disable the X but you can do this: <body onunload="yourfunction()">
[ April 27, 2002: Message edited by: Randall Twede ]
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it functionally possible to attach event handlers functions to OnUnload and Onload on the the same page/JSP. Can both events be fired on same page even if at different instances.
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cheers Al those logic for stopping resizing
and browser back worked .
cheers Randall.
 
Randall Twede
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is it functionally possible to attach event handlers functions to OnUnload and Onload on the the same page/JSP. Can both events be fired on same page even if at different instances.


yes that is not a problem and yes both events always happen
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI, Ian
The pop window generator is great. But I need additional functionality in my application. I need to disable right mouse click in the poped-up window.
How can I do it? Any Help??
Thx
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go through following link. It has similar implementation. Only additional thing you need to do here is capture events of poped up window.
http://developer.netscape.com/docs/manuals/js/client/jsref/handlers.htm#1120635
Thanks,
Onkar Shendge
[ May 29, 2002: Message edited by: onkarshendge ]
[ August 21, 2002: Message edited by: onkarshendge ]
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could attach a robot arm to the user's computer and control it via an applet and the serial port. If the user right-clicks on your page, give him a slap with the robot arm. He will soon stop right-clicking.
 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I hadn't noticed this stuff mentioned anywhere so I figured I would just throw this out. I noticed someone mentioned why disable the X in a window?
Since I had been dealing with NS for a project we could set the style of the browser to Kiosk (or super kiosk) mode. This would be used on a local intranet, not the internet. Look at the path (I believe) of the NS Browser and set the -browser to -sk (superkiosk) or -k (kiosk). Doing this removes the toolbar, menubar, and even the top right 3 buttons. Hope this might help someone out there.
Rob
 
swati bannore
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adam..LoL
Wish cld do that..and no one wld turn to my page.
Anyways, I found the solution for it,Thx all.
 
reply
    Bookmark Topic Watch Topic
  • New Topic