Saulo Menezes

Greenhorn
+ Follow
since Jan 15, 2003
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 Saulo Menezes

Hya!
My Netscape browser does not process a simple field validation that I have added to my code and does not show the year correctly, as Internet Explorer does.
I would be grateful if one of you could me point a solution. The validation code has been inserted underneath. By the way, for the display of the year I just called getYear(). Many thanks!
Yours,
Saulo
//Declaring variables that are to be used in the e-mail form
nome ='';
endereco ='';
assunto ='';
mensagem ='';
//Array that contains error messages
error = new Array()
error['check'] = "Please, verify the following field(s):";
error['name'] = "- You must identify yourself";
error['email'] = "- You must inform us your e-mail address";
error['subject'] = "- Your message needs to have a subject";
error['message'] = "- You cannot send an empty message";
//if e-mail address does not contain the '@' symbol
error['incorrect'] = "- Your e-mail is incorrect";
toFill = '';
//validating form
function isFormAllRight () {
nome = identity.value;
endereco = email.value;
assunto = subject.value;
mensagem = message.value;
toFill = error['check'];
if (nome == '')
{
toFill += '\n' + error['name'];
}
if (endereco =='')
{
toFill += '\n' + error['email'];
}
//verifying if e-mail has an '@'
if (endereco.indexOf("@")== -1)
{
toFill += '\n' + error['incorrect'];
//focusing on field
email.focus();
//selecting field
email.select();
}
if (assunto =='')
{
toFill += '\n' + error['subject'];
}
if (mensagem == '')
{
toFill += '\n' + error['message'];
}
if (toFill == 'Please, verify the following field(s):')
{
self.location = 'confirmation.htm';
}
else
{
alert (toFill);
}
}
//resetting form
function eraseAll () {
identity.value = '';
email.value = '';
subject.value = '';
message.value = '';
}
Hya!
The code underneath is giving me lots of problems but I can't figure out what might be wrong, as I am very new to JavaScript. I would be grateful if somebody could give me a hint on what I should do to fix it.
Let me explain what this code is supposed to do briefly. I have a music venue that has a maximum number of tickets set to 100. On my page I want to show the number of tickets available on a text box or any other way that would let this change dynamically. This number would change based on which option the user would select on the drop-down list but would start as 100.
I would like that the number of tickets available were then sent to my server together with the other information given in the form.
Up to now the number of tickets selected by the user is sent and also the name of the band but not the number of tickets available.
I would also like to block the okay button if there are no tickets available. That's why I've added an alert to the code but I don't think it's a good solution.
Alternatively the number of tickets available could be linked to a database, but I would say that's too advanced for me at the moment.
I am looking forward to hearing from you.
Yours,
Saulo
PS.: All my pages are in JSP.

Hya!
At the moment I am trying to implement a small web site based on JSP and JavaScript with my group at university.
I have created some JavaBeans which keep information about some artists, the day they are to present a concert, the price of the tickets and how many there are available.
This information is brought back to the user once he makes any choice on his browser. The problem is that the number of tickets available is not changing dynamically. Actually this number is a JavaScript variable that always starts with the value 100.
I wonder how I could make this number change if every time a different user visits the page this number will be set to its first value, 100.
I would be grateful if one of you could give me some advice in this.
Yours,
Saulo
[ May 22, 2003: Message edited by: Saulo Menezes ]
17 years ago
JSP
Hya!
I would be grateful if someone could point me what is avoiding my JSP page to work. Underneath you can find the error message that appears every time I test it. Thanks for the attention!
Yours,
Saulo
-----------------------------------------------
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:326)
at gbs.Catalogue.getValue(Catalogue.java:64)
at org.apache.jsp.basket$jsp._jspService(basket$jsp.java:252)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
17 years ago
JSP
Hya!
I have set a digital timer on my page by using Javascript but I don't know how to create the function to update this time. Up to now the time just updates if I reload the page. I would be grateful if somebody could tell me how to do it. I have found out that setInterval can be called to do it but I didn't manage to make it work.
I am looking forward to hearing from you.
Yours,
Saulo
Hya!
I am quite new to JavaScript and even though I am reading loads of books about it I still can't find answers to basic things such as this I am trying to implement today.
I have a form on one page with three fields: first name, last name and e-mail. Once the user clicks the submit button I want the values given by the user to appear on a second page but the code I have written is giving errors. Every time I test the pages the browser alerts me that the form I am trying to get info from is undefined.
Another thing I wanted to implement on the same form is that these values were sent by e-mail to the user but without using the mail tag.
The two htm files are on my Tomcat server and they seem to work perfectly where they are but the browser still alerts me that the form is undefined.
I would be grateful if somebody could explain me how I can define a form that is present in another file and how to post whatever the user has inserted in the form without the need of the user's e-mail program.
I am looking forward to hearing from all of you.
Yours,
Saulo
I had to reinstall Tomcat on my Windows XP and something went wrong. Every time I try to start it the folowwing appears on the browser. I would be grateful if somebody could give a hint on this. Many thanks!
Saulo
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)
18 years ago
JSP
I am currently studying the subject 'Cookies' and up to now I am a bit confused.
My group and I are about to create a site that will use solely jsp pages. In it I am in charge of the cookies.
The teacher intructed us to use JavaScript for that but I found out that it can be done using varied scripts or programming languages. Would anyone be able to tell me which would be the best solution? I intend to keep the date on the client-side.
Thanks
Saulo
[ March 26, 2003: Message edited by: Saulo Menezes ]
18 years ago
JSP
I have installed Tomcat on my computer recently and I haven't figured out how to work with it yet. Would anyone be able to tell me where I could find a straightfoward tutorial for non programmers? Many thanks!

Saulo
18 years ago
Hya!
Could someone point out what I have written wrongly on this code? I can't compile it at all. Thanks!
Saulo
18 years ago
Hello!
Thanks a lot for all the help. Now it's all working fine but I can't still compile my Applet, as I haven't defined the itemStateChanged. I did try but I ended up mixing everything. I have checked on books and tutorials but nothing helped me finding a solution for this puzzle.
Below is the code I tried to insert on my Applet, which returns lots of errors as the method does not recognise the g variable - part of the paint method. Nevertheless I need those Strings to appear on the coordinates described on this faulty code, based on the choices that are there. I hope someone can help me fixing this, as it's all I need to finish this Applet (I've been working on this for three days, at least).
Regards,
Saulo
18 years ago
Hi everyone!
I have been searching for a while for a code that would let me reload my Applet, but I haven't found anything really. Would anyone be able to tell me if there's a code that would allow that to happen.
It's just that I've created an Applet and there's a button whose event handler must restart the whole Applet but up to now it's not operating at all. I would be grateful if somebody could answer me this.
Yours,
Saulo
18 years ago
Thank you for the help, Manfred, but I am still not sure of what I have got to do. Is there a way to set the position on my choice box on the Applet? I want to make it appear only when a certain button is clicked and on a certain location.
Regards,
Saulo
18 years ago
Hi everyone!
I am trying to implement an ItemListener on my Applet but I can't manage to discover what I need to add to the command itemStateChanged. All I want is that once the user chooses an item a string will be drawn giving a description. I know that the string has got to be called on paint, but then what would I add to the method itemStateChanged? Would I need to use boolean variables in this case? Following is part of the code I've used. I hope that helps. One more question: can I display the item list anywhere in the Applet by using coordinates?
Saulo
desk = new Choice ();//setting item list and its content.
desk.add("Picture 1");
desk.add("Picture 2");
desk.add("Picture 3");
desk.add("Picture 4");
desk.add("Picture 5");
desk.add("Picture 6");
add(desk);
desk.addItemListener (this);
public void ItemChanged (ItemEvent ie) {}// that's where I am not sure what to do. I would be grateful if somebody could give me a hint on that.
18 years ago
Thanks a lot for the help, Manfred. This will be really useful for me.
Saulo
18 years ago