Hi all,I have one web application.my client requirements is that when we open the forms in web browser, the save as option in file of menu bar become disable.
plz help me .
thanx
Hi all,I have one web application.my client requirements is that when we open the forms in web browser, the save as option in file of menu bar become disable.
plz help me .
thanx
Subject: how to disable view source of save as option
Hi AM P,
Its difficult to disable the “SaveAs…” option alone from the file menu. Instead you can hide the File menu as a whole.
You can use Javascript “window.open” method to achieve this. In this case you have to open your design elements in pop-up windows.
for e.g lets say you have to open a form called “userprofile” now you would use something like this:
window.open(“http://server/database/userprofile?openform","window name”,“window parameters”);
Refer to the window.open event for exact usage.
so for “window parameters” you can give various parameters like:
resizable=0 (can take either 0 or 1, 0 will disable resize functionality)
scrollbars=0 (can be 0 or 1, 0 will disable scrollbars)
location=0 (to show/hide address bar)
status=0 (show/hide status bar)
width=x (width of the window)
height=y (height of the window)
refer in web for more info on these.
In the above mentioned way you can show/hide the file menu of a browser by opening it in customized pop-up windows.
Note:
pop-up windows has an disadvantage. most of the pop-up blockers will block/disable pop-ups. So be sure to “allow pop-ups for the current URL or location”. You can set pop-up options for each browser(whether IE or Mozilla)
For IE the pop-up settings will be located under Tools->Internet Options–>Privacy
You need to uncheck “Block pop-ups option” or in settings… tab allow the current server ip (the ip in the current url).
For Mozilla the pop-up settings will be located under Tools–>Options–>Content
Uncheck “Block pop-up windows” option. Similar to IE you can use the settings tab to allow specified server’s for which pop-up’s can be allowed.
Hope that helps,
Jason.
Subject: RE: how to disable view source of save as option
Then again, it’s not difficult to “regrow” the chrome in Mozilla and Safari, so a pop-up isn’t an answer either. If there’s stuff on the form the user shouldn’t see (hidden fields, etc.), make sure you don’t use “Generate HTML for all fields”. And if you’re worried about offline composition or other automated attacks, then use a time-sensitive hidden field with a hashed value and check the HTTP Referer before allowing saves.
Subject: how to hide the menu bar and tool bar for current window
Hi Jason,I have no need to open the pop window,while i opened the current window in IE with hide menu and tool bar,mouse event and keyboard event.so no body can save /save as/print/edit through menu bar,mouse and keyboard etc.i used window.open ,it open the again another window.but requirement is that to open the current window
plz tell me how can we hide the menu and tool bar.