GEEK I made a utility with eight frames, where each frame is controlled by an Active Server Page (ASP) with a listbox. The data in the listbox comes from a Microsoft®Access database. When I test it on Microsoft Internet Explorer 3.02 it works great, but when I test it on Windows®98 or Internet Explorer 4.0, I have a big problem: only the bgcolor shows up. I suspect this is due to the frameset and frames. Why did this change? And where can I find documentation on how Internet Explorer 4.0 differs from previous versions? GEEK There are many resources on the Microsoft Web site that describe what's been added to Internet Explorer 4.0. Here's one that details many of the differences between Internet Explorer 3.x and Internet Explorer 4.0: http://msdn.microsoft.com/workshop/prog/ie4/changes/4vs3.htm The problem might be that your code isn't formatted properly. I've seen other situations where Internet Explorer 3.x was a little too forgiving with bad code. Internet Explorer 4.0 represents a fairly large rewrite, and in some cases it is far less forgiving of sloppy HTML coding.
GEEK I'm developing a site using Visual InterDev and I want to do a side-by-side comparison of data from two companies. The first page has a form containing a Submit button and two text boxes labeled Company A and Company B. When my user clicks Submit, I want to return a frameset containing two frames. That means one ASP has to return three pagesone for Company A, one for Company B, and one for the frameset. How do I code that ASP?
GEEK I created a combobox inside an HTML form that is displayed on each page of my site. There is a Go button beside it. Users can select a Web page from the combobox, then click on the Go button to bring them there. How do I make the Enter key simulate this same action when it's pressed? |
<html>
<head>
<script language=vbscript>
SUB document_onkeypress()
if window.event.keyCode = 13 then
test.submit
end if
END SUB
</script>
</head>
<body>
<form name=test action=test.html method=post>
<select name=list>
<option>Item1</option>
<option>Item2</option>
</select>
<input type=submit value="Go!">
</form>
</body>
Of course, I'm leaving the submit button there for users who aren't using Internet Explorer 4.0.
GEEK I have a Visual InterDev-written application that uses ASP to display data from a SQL Server database on a page. From this page, I would like to add a button that will save this recordset as a Microsoft Excel spreadsheet, launch Microsoft Excel, and display the spreadsheet. My site uses several versions of Microsoft Excel, including 5.0. How can I do this?
GEEK This is actually something I've done on several pages that I wrote for my workgroup to use in managing some of the information we deal with. You have a dynamically created Web page, but you also want to provide the information as a spreadsheet. While you could write a server-side component that takes the resultset from the database and generates a temporary .xls file formatted for Microsoft Excel (or some other product), it would involve a lot of work. The best method is to use one of the standard ASP components for outputting a simple text file, and write out the information as a CSV file. Here is the code I used to create the CSV file:
|
I built the CRLF variable to provide a Carriage Return/Line Feed pair to break lines in my file. I could have used the built-in constant vbCrLf to do the same thing. But hey, sometimes I like to take the long way around. In this particular case, I am using the LOGON_USER value to name the file. I could have used a random number to generate this file, but I would have to make sure I clean up the file (most likely by creating an OnUnload event handler). My group isn't very large, so this will create a finite number of different files. In most cases there shouldn't be a synchronization issue such as the same user hitting the site from two different instances of the browser and asking for two different resultsets. If this site were a commercial site, I would make the file names truly random, and I would clean them up after the fact. Once the text file has been created, all you need to do is write data out to it at the same time you send the information out to the HTML stream: |
|
And then at the very end, close out the file: |
|
At the bottom of the page, under the table displaying the HTML version of the data, I include a link to the spreadsheet version of the data so the users can go to this if they prefer: |
|
You could code it so that the spreadsheet file isn't created until the user clicks on the link and then is taken to the file. But I found the code shown here to be simple to implement and it works fine for my particular situation. GEEK Oh, if only the whole world used Internet Explorer for Windows 95 or Windows NT® the wonderful things I could do on Web sites. Unfortunately, there are competing browsers developers must design for as well. Hence, I have a bone to pick with you. Your advice is usually helpful, but not when it comes to JScript. In the November issue, you mentioned that you could use the following statement to set the cursor focus to a form field: |
|
That worked great under Internet Explorer. It didn't work worth a hill of beans in the competitor's browser. Instead, I had to change the statement to: |
|
GEEK Many apologies for any code that might not be fully compatible across the various browser platforms. I am very aware that Web designers face many challenges when trying to design pages that work perfectly across all possible browsers. I do attempt to keep abreast of these issues and provide information that will be appropriate for all browsers, but from time to time some code might sneak out of my fingers that doesn't work on all possible browser permutations. It is by no means intentional, and only serves to further illustrate the compatibility frustration that many Web designers face. GEEK I'm currently developing an application using ASP that requires uploading files from the client side to the Web server. I tried to do this using multipart forms: |
|
But in ASP, I was able to get only the file name and not the contents of the file: |
|
How can I access the contents of the file? GEEK Currently, Internet Information Server 3.0 does not include any built-in component for supporting the FileUpload (RFC 1867) capability that both Navigator and Internet Explorer provide in their clients. The issue is that the data stream sent back to the server is a binary stream of a special multipart MIME format. To get the information out of this data stream appropriately, you must access the stream as a binary array. There are Perl, CGI, and ISAPI-based server programs that you can install on your server for doing this. Microsoft has an ISAPI application called Posting Acceptor that you can download to provide this capability. You can find more information at: http://www.microsoft.com/windows/software/webpost/post_accept.htm Also, if you would rather have a fully scriptable ASP component, check out the Software Artisans Web site: http://www.softartisans.com They have a FAQ regarding their support of RFC 1867 that you can read at: http://www.softartisans.com/softartisans/freqasques.html You can find more information about RFC 1867 itself at: http://www.internic.net/rfc/rfc1867.txt
|