Web programming - Script for window control (Java? ASP?)

Posted in: darrelrussell.com edit
08 Jan 2009
  • Scenario: I am upgrading an intranet app and need a chunk of code to handle a specific window action. The log-in page (index.htm) has one field and a submit button. The action= page is an ASP page that requires the info from the index.htm field. Currently, when SUBMIT is clicked, the window loads the ASP page. Need: To load the ASP page in the original (parent/focus) window, but limit the window controls to just scrollbars. I don't want a popup window. Summary: Please supply a code chunk that will allow me to load a new page in the open window while also limiting the window controls to just scrollbars. The page that will load is an ASP page. Misc: I will supply the code I am using if needed. Please advise.


  • I need the original index.htm and/or a pointer to your website-- have you tried using target=_parent, etc.? Also I don't quite understand you you meant by "limiting window controls to scrollbars"? I thought this ASP code loads in a new browser window--the scrollbar will be there if the presented materials is larger than the default window.


  • Index.htm:
    Sherman Pursuit

    Please select a division:  

     

    ------------------------------------------------------ My form action="home.asp" and method="post" so I can send the value to the ASP page. However, when the user clicks the submit button, I want the home.asp page loaded into the same window of the index.htm. No problem until I try to control the features of the window. I don't want any window control (e.g., back/forward button, address bar, menu choices) displayed except for the scrollbars. I can do this in a popup window but don't know how to do so in this scenario. Regards, Krickles


  • Hi Two parts to your question--two answers: 1) To make your asp load into same windows--use target="_self", ie: 2) Because you are making it appearing in the same window, there's no way to wipe out the buttons, menus, etc. Of course you will still get the scrollbar. Let me know if this answer your question so I can post a formal answer for you. Thanks!


  • I like the idea of opening a popup window and then closing the parent. I have no idea how to do this, please provide instructions. BTW, I don't have to worry about a popup stopper b/c our IT department locks down all work stations and has the same image on all of them (which doesn't include a popup stopper). No one can install anything on their own machine. Thanks in advance. Regards, KRickles


  • Alright, can you give this a try and let me know? Thanks


  • BTW, I can install PopupStopper without admin rights. Also, I can disable Javascript on my browser without admin rights. I do it all the time myself (since personally I despise popups :)


  • Also, note that when you start using Javascript you have to watch browser compatibilities carefully. And also, in IE, for security it will prompt you if you want to close a window that is manually opened by you. Javascript is annoying IMO.


  • Perfect! Thanks so much for the help. KRickles


  • Thanks krickles-ga. Here's just a repeat of what we discussed. target="_self" can be used to open a page in the same window. However, to faciliate scrollbar only flexibility, the client would like to have a popup and then close the parent window. Thus: does the trick.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Web programming - Script for window control (Java? ASP?) , Please add it free.