SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member KPinAF's Avatar
    Join Date
    Feb 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using a .js file as an executable (of sorts)

    Hello,

    I have a user who is not happy with an ASP database program I wrote for them. They want the program to feel less like a webpage. So, I found javascript code to strip out all internet explorer elements (scrollbar, address bar, etc.), but they are still not happy that it has to be linked from a website.

    So, having little javascript knowledge myself, I ask this. Is there anyway to use a .js file as an executable of sorts. Mainly using the script to popup an internet explorer window with the "no IE elements" parameters I am currently using?

    Also, I tried just setting up a windows shortcut to an html page that popped up my ASP page and then closed itself. However, you get that annoying "Website is trying to close the window" dialog box, which of course the user was not happy about.

    Thanks for the help!

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use the power of HTA's (HTML Applications) to run you script in an ordinary system window.

    http://msdn.microsoft.com/workshop/a...node_entry.asp

  3. #3
    SitePoint Member KPinAF's Avatar
    Join Date
    Feb 2005
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, I am astounded I had not heard of this before.

    Thanks alot for the help!

  4. #4
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Failing that, did you hand write the program? If so just switch over to Visual Basic 5/6 and use the coding in there, its a program after all, but you will need to use a SQL database if more then one application is ditrubuted ( as you cannot remotely update an access database off domain )

    I started ASP programming about 6 years about, now I'm hand writing everything, and I have only just remembered ( 1 year ago ) and I could create my own software using the same techniques.

    gav

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    However, you get that annoying "Website is trying to close the window" dialog box, which of course the user was not happy about.
    If they only care about it working in IE, there is a trick to get around that. In IE, a popup window can be closed by javascript because it has an opener property. If IE sees an opener property for the window, it determines it is a popup window that was opened by the js, so it can be closed with no warning. Well, as you may or may not know, with js you can create properties of objects at will, e.g.:

    obj.color = "red";

    Similarly, you can create an opener property for the window:

    window.opener="anything";

    Subsequently, if the script tries to close the window, IE thinks it is a popup window, and closes it without a warning.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •