Close the browser using javascript from classic asp

Posted at 8:44:29 AM in Web (12)

Before I get into this subject, I use to Google my searches for anything asp with a -.net in order to keep out the asp.net groups, but that doesn't appear to work as well anymore. Now the keyword I use is classic asp.

One of my recent problems has been to close out a window that I opened after the user updated some data on. Some explanation... I have a data entry page that pulls up the next record automatically when the user presses the submit button. I supply the data in a window and the user populates fields on the next page, then presses submit and brings up the next record. Naturally, this doesn't allow for the user to go back to fix any mistakes he might have made. To allow the user to go back, I run a second window with a list of the names the user has completed. As each name is completed, the list updates. So if I just finished one that I needed to fix, I'd click the last name on the list and it would pop up an additional screen populated with the data I had just entered. The way this works in chrome, I have main window that I am doing my normal data entry, a separate window that contains a list and if I click on one name in the list, a new window opens up on a tab next to the main window.

My goal was to let the user update the new window and click update, store the corrections and return to the main window with the new window closing automatically.

The problem is that if I put the window.close() on the submit button, I'd never store the data to the database. I didn't want to get into a vbscript, calling a javascript that called a vbscript. My page is a standard classic asp page that loads a form when initially opening the page with the form calling itself to post the data. This is easy enough as checking the state of the form field (in this case the submit buttons state) allows me to load the fields from the database on the first pass and branch to a different function to save the fields to the database on the second pass. The second pass is the key to closing the window. In the logic that saved the data, I used this code that I got from here.

<%
if xyz = "ok" then
%>
<script type="text/javascript">
window.opener="something";
window.close();
</script>
<%
end if
%>

The if then end if logic was replaced by my own requirements, but the javascript portion was entered exactly as it is here. On the first pass, there is no javascript like this on the page. It gets written as the page gets called from the submit button. But it gets written before any HTML headers are ever written. I just write it out right in the middle of my script. This works exactly has I had planned and closes the new window, saving the data and returning focus back to the main window.

The new window is based on the main windows layout, so when the new window closes, it makes you blink a couple of times trying to figure out what just happened. I went back to open the new window to see if the corrected information got saved. I like this better because it allows a data entry person to keep going with minimal mouse or keyboard activity, but if the information was for the casual browser, I'd put a message on the page that said the data was saved successfully with a link to close the window.

Written by Leonard Rogers on Wednesday, July 20, 2011 | Comments (0)

Microsoft Office 2010 Beta and the Q drive

Posted at 10:32:37 PM in Installations (48)

I just found out that Microsoft office 2010 Beta takes over the Q drive. It doesn't matter that it's already mapped to a network drive. Once the software is installed, the local assignment takes over that drive letter and suddenly all applications that depended on the Q drive network map will no longer function. This is similar to Microsoft taking over the M drive for Microsoft Mail. That didn't go over too well either.

I personally like to assign the Q drive to my quickbooks applications. When one laptop installed Office 2010, I had troubles getting the only machine in the office setup to access the Q drive differently. I took a stab in the dark and did a google search for Q drive issues and found the problem. Hopefully this will help others. I found one procedure that made the Q drive disappear, but it still didn't show up in the network mappable drives.

The Q drive is suppose to be used for online updates. I believe they call it, click and go and acts as a virtual hard drive to Microsoft servers to update Office components.

Written by Leonard Rogers on Tuesday, July 19, 2011 | Comments (0)

Office Move

Posted at 6:52:55 AM in Installations (48)

Well, the move is almost complete. The move consisted of 38 phone stations and 45 network devices. Of those devices 8 were servers and I also moved the mail server. Argosoft was finally not meeting up the the standards I needed so I upgraded to hmailserver. I am having one problem with that. It seems the POP accounts are getting locked by iPhones accessing the same mail accounts as Mac Operating systems. One of those devices checks every minute and ignores the request to check less often.

The biggest problem was moving the phones. We were not able to get the PRI in before our move in date so we had to get a temporary solution and get 12 POTS lines in hunt.  However, the main line only has one top path consequently only one call makes it to our switchboard, everyone else gets busy signals. The phone vendor is Telepacific. They have been less than helpful through the entire move. Part of our issue with them is an outstanding T1 circuit which was never connected, but they had been billing us for it even though we told them not to install it. In a company of this size, the IT department doesn't review the bills. It wasn't until a review that the extra circuit was discovered. After pointing out the issue, our relationship with them deteriorated pretty quick. At first they refused to call forward the PRI lines to the new numbers until 2 weeks after out move in date. Part of that problem was that they kept rejecting the Controller's signature as an authorized agent to make such a move. Now that we have the calls forwarded, they used 2 wrong numbers of the 4 we wanted forwarded and I can't seem to get the person taking the order to understand what a top path is. When I talk to the repair department, they have no problem understanding what I want, but won't do it unless the order is submitted via the order department.

I have a 10:00am meeting today to see about just dropping the call forwarding altogether as a fix, but this won't help because our customers will continue calling the old number for quite sometime. It's been 3 days that I've been trying to get these top paths taken care of.

Written by Leonard Rogers on Friday, July 8, 2011 | Comments (0)