GEEK In a frame-based version of an Active Server Pages (ASP) project, how do I pass around Request.QueryString to different modules? For example, how do I get the QueryString in abc.asp from another file called bde.asp? GEEK The use of Request.QueryString is a server-side operation. The structure and contents of the frames within a <frameset> is a client-side feature, so there isn't any way for abc.asp to simply target a Request.QueryString to pull data out of bde.asp. Instead, you need to design your pages so that they pass the information between frames on the client prior to the ASP file being requested. There are many ways of doing this, but forms with hidden inputs are especially appropriate. Assuming that bde.asp is managing the login of the user, and abc.asp is managing a request for information, the server-side code for bde.asp might look something like this: |
<form name=userinfo>
<input type=hidden name=username
value=<%=request.querystring("username")%>>
</form>
Then when the user issues a request for information in abc.asp, the client-side code might look like:
<form onsubmit="return validate();" ...>
...
<input type=hidden name=username>
</form>
<script language=vbscript>
function validate
...do whatever you want to do for validation
...now go grab the username from the other frame:
document.myform.username.value = _
window.parent.frames("login").document.myform.username.value
end function
</script>
This will "borrow" the form value from another frame and pass it along as a form value in the current frame, allowing your server-side code to get the login value.
GEEK
What does the Win32® API function GetUserName assign as the user name if there are no individual user configurations on a system?
GEEK GetUserName will return the name of the currently logged in user. Under Windows® 95, it is not necessary to log in to the system, so in this case the function will return false.
GEEK What kind of non-Java code can I put into a script (see Figure 1) so that not only will the mouse rollover effect work (it already does), but a large area dedicated to displaying JPEGs will change at the same time? In other words, every time a mouseover occurs over the button, I want an image over the button to change as well as the button itself.
GEEK Changing two or more images on a mouseover event is easy. The mouseover event doesn't have to occur on the image you are trying to change; you can easily change any image on the page. And with just a little extra code, you can even change all of the images on the page in response to a single mouseover or mouseout.
In your case, I'll assume that in addition to changing the image button to a highlight state on mouseover, you also
want to do something like show a preview of the page or
picture that will be brought up if you click the associated
button. In such a case, you could easily modify your code to something like:
function turnOn(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "on.src");
document["preview"].src = eval(imageName + "preview.src");
}
}
function turnOff(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "off.src");
document["preview"].src = nopreview.src;
}
}
GEEK How can we perform ADO accesses to SQL Server databases written in Java? Supposedly, ADO for Java shipped with the Internet Client SDK, but we haven't been able to find it.
GEEK The recently announced Visual J++ 6.0 includes support for ADO access. You can find more information about this at
http://msdn.microsoft.com/visualj/
and http://msdn.microsoft.com/visualj/prodinfo/datasheet/
GEEK I would like to design and test ASP files locally under Windows 95. I have Microsoft Internet Explorer, FrontPage® Server, and the Personal Web Server, which came with FrontPage. Do I need to run Internet Information Server as well? If so, how?
GEEK If you are running Personal Web Server on your Windows 95 system, then you have everything you need to host ASP pages on your local Web site.
The important thing to remember is that you need to open the pages via the HTTP transport, not the FILE transport. To see your local Web from your browser, just enter http://localhost in your address bar. The file this points to depends on the directories you specified when you installed Personal Web Server on your system.
GEEK I know you can read from and write to a one-line text box from ASP, but can you read from or write to a scrolling text box? Is reading from or writing to a memo field different than it is with a text field?
GEEK What's wrong with this?
|
|
It works fine for me. The main difference between memo and text fields (when talking about database field types) is that a text field is 256 characters, while a memo field is unlimited. Memos also usually can't be used in queries. Regarding server-side ASP processing, a memo field returned from a database query can only be read from the recordset object once. So if you had a memo field called, appropriately, memo, then |
|
would return an error on the second attempt to display the memo. The correct way to do this is: |
|
GEEK A friend is using Microsoft Outlook 97. Whenever he sends mail to a recipient using a Unix server, the message loses its word wrap (the message appears to the recipient as one long line of text). Have you ever heard of this? Do you have any suggestions? GEEK I am constantly using onmouseover and onmouseout events within one of my HTML pages to swap between different images. Since it can sometimes be slow, is there any way of preloading an image from JavaScript? |
|
Figure 2 shows this in action. Copy this file to your local machine. Start Internet Explorer and, from View | Internet Options | General, select Delete Files in the Temporary Internet Files section. This will clear out your cache. From the File menu, select Work Offline. And just to really clear things out, close down Internet Explorer (this will release any images that it might currently have in memory). Now double-click on the sample page from Figure 2. You should see the text of the page come up, but not the images. Move your mouse over several of the backissue listings and verify that no images appear. Now, move your mouse to the top of the screen to keep it from generating mouseover events. From the keyboard, hit Alt+F, then W, to turn off the Work Offline mode. Hit F5 to refresh the page. Notice in the status bar that several images are being downloaded. Next, hit Alt+F then W, to turn the Work Offline mode back on. Move your mouse over the backissue listings on the page. Notice that the image display on the right displays the appropriate MIND magazine covers, and very quickly as well. GEEK I have created an .alx file that will contain two command buttons and two text entry boxes as an input form. One button will reset the form. I would like the other button to submit the contents of the two text entry boxes to my own address via email. How can I do this? GEEK I have a Microsoft Excel spreadsheet that is updated every n minutes with DDE. How can I get this information onto a Web page?
|