Win a copy of Rust Web Development this week in the Other Languages forum!

kat luna

Greenhorn
+ Follow
since Jul 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kat luna

Hi all,
This may be a very stupid question, and if so, I apologize in advance... I'm responsible for building the JSP's in my department, and in our company, the protocol is that the business dept gives me sketches, I build the JSP's, then hand them to the development team who puts the JAVA code behind them. Well, the business has asked me to do the front end for a File Save As function in a web application.
According to them, the form JSP asks for File Name, File Location and File Type and has a submit button. When the user fills out all this information, the application (remember, this is a browser interface) is supposed to save the data to the user's hard drive in the location that they entered, with the name they gave.
I don't think I've ever seen this before. Is it even possible? In my experince, when saving a file from the Internet, you right click on a hyperlink and get the system Save As dialogue. Can we skip that and create the functionality to save a file directly to a user's hard drive?
I'm thinking that they are confusing the form element for file upload with a download capability. Does anyone know how to do something like this? If I know what the developers will need in order to make a web application download a file it will make everything go faster, but I just can't picture this.
Any help appreciated,
thanks
Kat
18 years ago
JSP
Hi all,
Our new security standards require our company web apps to prevent users from saving their passwords using IE's "Save password" function. Does anyone know what to add to the JSP, or how to construct the login page so that no browser can save/store the password?
Thanks,
Kat
18 years ago
JSP
Hi all.
I'm working on an application that is basically a series of forms. Each page gathers info from the user and passes it to a controller servlet who then determines which jsp page to serve up. The jsp imports various beans and displays a subsequent form containing the bean parameters (name, member_no, etc.).
The problem is that we have implemented this:
res.setHeader("Pragma", "no-cache");
res.setHeader("Cache-Control", "no-cache");
res.setDateHeader("Expires", 0);
dispatcher.forward(req, res);
in the servlet to prevent users from backing up through the jsp pages. Now, when we try to print the pages in Netscape, all that prints is:
DATA MISSING
This document resulted from a POST operation and has expired from the cache. If you wish you can repost this form by reloading the page...
The pages print fine in IE, but in Netscape4.x, this is all we get unless we reload the page BEFORE hitting the Print button.
Does anyone know why Netscape seems to print an empty cache instead of the actual jsp page? or if there is something in the servlet that is overkilling the no-cache function?
Any ideas on how to print this jsp in Netscape on the first try?
thanks
kat
19 years ago
Hi all!
I am working with an application that involves multi-page forms. To prevent the user backing up, each jsp includes
<%
response.setHeader("pragma","no-cache");
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.addDateHeader("Expires", 0);
%>
However the application uses a dhtml menu that needs Netscape to reload the page whenever the browser is resized. As the page is reloading, it first displays an error page:
Data Missing
This document resulted from a POST operation blah blah...
and then after several seconds, the correct page is reloaded. Is there any way to prevent this error page from displaying? Other than removing either the dhtml or the no-cache functionality?
Thanks,
kat
Hi all. I've just been given 150 jsp pages designed for IE and asked to make them Netscape compatible. sigh.
Okay, so my question is... On almost every page they have textboxes coded like
<input type="text" name="new_effective_year" value="<%=request.getAttribute( "effective_year" )%>">
It was my understanding that quotation marks couldn't/shouldn't be nested like this, but should be
<input type="text" name="new_effective_year" size="4" maxlength="4" value="<%=request.getAttribute( 'effective_year' )%>">
However this app runs just fine (in IE and apparently Netscape, although QA has only tested with v4.5. I am wondering if these nested quotation marks will cause any problems in any browsers. I've only got authorization to change the HTML, and since the app works, I don't want to push for a change in coding style unless it really will cause problems.
Anyone with past experience in this issue?
Kat
19 years ago
JSP

Originally posted by james swan:
So unless there is a specific need for you to do form validation with onBlur/onFocus combination (or if you don't mind writing different versions of the code for different browsers (nasty), I would avoid it.
James.[/B]


Hi and thanks for the suggestions. Sadly, our design document says that there MUST be item-by-item validation on each form, not just on form submit.
I have narrowed the problem down to the fact that in Netscape, tabbing out of a textbox places the cursor in the next form object before onBlur() of the previous fires and that is why I am getting an alert loop. (blank textboxB loses focus to display the alert for blank textboxA -- which in turn triggers an alert for blank textboxB which triggers alert for blank textboxA etc...)
In short, I still am at a loss as to how to do item by item validation in Netscape. onChange() avoids the alert loop, but it doesn't fire if the user simply tabs past the textbox without entering any data.
Anyone else have done this successfully?
Thanks in advance,
kat
why bother with javascript?
because I'm *just* the web developer (better known here as art school dropout) and the "Developers" insist that all validation be done client-side before the data is returned to the servlet.
I have repeatedly suggested that javascript is a light weight programming language and too dependent on browser versions/settings/etc to be reliable, but the response is "find a way to do it." So I'm here asking for help. The only book I have on Javascript was written for Navigator 2.0 and most of the web tutorials I've looked at are from 1999.
Can anyone recommend anything (books/URL's) that has information on Javascripting for version 4.0 - 6.0 browsers? Please?
Thanks.
Kat
Can anyone point me to a good resource for writing javascript that functions in both IE and Netscape version 4 and up? I have studied documents and tutorials until I'm half blind, but even the simplest code seems to fail our QA testing.
I've done a simple form validation using onBlur() as recommended in all the javascript tutorials I've seen. I am testing only that the text box is not blank, but it still seems to cause an infinite loop in some versions of Netscape 4+. I tried using onChange(), but sometimes this prevents form submission completely IE!
None of these effects happen with any regularity. Three out of 5 textboxes work fine, two cause loops in Netscape. 9 times out of 10 the form submits in IE, but occasionally it will refuse to submit even though the text box is correctly filled out....
I'm just looking for a simple form validation that works in all versions all the time. Can anyone help?
Kat
Hi all.
We are doing form validation using the onBlur event to make sure each textbox is filled before moving on to the next one. However this produces an endless loop in Netscape and you have to close the browser to escape (not very user friendly ).
I have searched the archives here and several people recommended the onBlur event for validation. Has anyone found a way around the Netscape problem or do you all code for IE only?
Here is my code:
<SCRIPT LANGUAGE="JavaScript">
<!--
function verify(field) {
var str = field.name;
if(field.value == "") {
alert("The field is " + str);
field.focus();
}
}
//-->
</SCRIPT>
....
<FORM>
SSN:<input type="text" name="ssn" onBlur="verify(this)" maxlength="9">
First Name: <input type="text" name="firstName" onBlur="verify(this)">
Last Name:<input type="text" name="lastName" onBlur="verify(this)">
</FORM>
Hi all.
My developer has a dynamic list box on one of his forms. ie: The Administrative user can create options which display in a Select Box for the General User to choose from. Our intention was for the Admin User to create options of about 50 characters max, but our business requirements do not allow us to restrict the size of the Option Name the Admin User creates.
This leaves us open to the possibility of a SelectBox that is hundreds of characters wide, throwing all table formatting out the window and causing the screen to scroll horizontally.
We've been arguing about this endlessly for days now, and apparently CANNOT limit the character input for the Option Name. Is there any way to manipulate the display of the Select Box to prevent it from exceeding a certain number of characters wide but still show very long Option Names?
The developer insists we should be able to display the first word in the List and place the remainder of the Option Name in a Tool Tip, but that's way beyond my ken. His other suggestion is to wrap the individual Options. Again, I've never seen this done... and it's my job to try to HTML his ideas.
Does anyone know how to do either of these things or have any other more realistic suggestions for limiting the width of the Select Box when we can't limit the length of the Option Name?
Thanks!!
kat
Hi all,
I have just been asked to apply some some HTML design to a prebuilt application where the developers are EXTREMELY protective of their code. Each page involves several forms which they have placed willy-nilly amongst table rows.
ie:
<form action=blah>
<tr><td>Cell stuff here with form elements</td></tr>
<tr><td>Another cell here with more elements
</form>
</td></tr>
<form2 action=blech>
etc...
Now my belief has always been that forms and tables don't mix well. Either the entire form should be within a table cell or it should span the entire table. Unfortunately the developers are very insistent that I do not touch their code and only modify the colors of the cells.... sigh....
Does anyone know of any documentation/websites to back up my claim that their structure is not going to stand up well across browsers and multiple OS once it goes into production?
Or am I just being an old-fashioned crank?
Thanks for any input.
Kat
Hi,
We are developing an application where the user is within a frameset once they are succesfully logged in. Each interior page contains forms, data, etc, and at the top of each jsp we verify that the user is in the session with the following code:
<% form.setSession(request.getSession());
if (!sessionManager.alreadyLoggedIn(form.getUserId())) {
sessionManager.logout(form.getUserId()); %>
<jsp:forward page="SessionExpired.jsp"/> <%
} %>
However this code displays the Expired page inside the frameset. I would like to forward outside of the frames so that the menu bar is no longer visible and the user must log in again but since forward doesn't have a "target" attribute, I'm not sure how to do this.
Does anyone know how to achieve this using jsp:forward? Or is there a better way to get outside the frames if the user is not found in the session?
thanks!
kat
20 years ago
Is there any way to specify where the cursor is placed in the textbox when it receives focus?
We are using a dynamic page where the textboxes contain information to be updated and our client would like the cursor to appear at the beginning of the text in each input box as they tab through the page.
So far, I can't find anything to specify what position the cursor should go to. any ideas?
thanks!
kat
Have you calculated the size of each cell plus spacing and padding correctly? If the total table width is smaller than the combined totals of the cells including padding and spacing, then one cell will be shrunk regardless of what size you specified. Cell width is lower on the heirarchy (meaning table width takes precedence).
kat
Hi Brendan,
A ScrollPane is a Swing component and doesn't exist in Javascript. You could use a frame for the table, but since your header and sidebar need to scroll WITH the table, I'm not sure what you'd gain over having the enire web page scroll naturally.
A frameset is generally used to prevent scrolling of one portion of the page (ie: to keep the header at the top of the browser viewport).
kat