Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 13th, 2005, 10:48 PM
Registered User
 
Join Date: Apr 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to skoob
Default I need some codes to create a program

I need some codes to create a program.
I want a do something like this. when you write something down in your prompt like; i have stomac hurt i'd like to get the answer like aspirine, or tylenold or whatever. I traied something like this
<HTML>
<BODY>

<SCRIPT LANGUAGE=JavaScript>

var loco = prompt("plise enter the problem that you have");
var edad = aspirine;

if (stringloco == stringedad)
{

  document.write("aspirine");
}

</SCRIPT>

</BODY>
</HTML> but i dont get what i want; if i change the value of variable "edad" to a number i get the result of my "if statement"
but only with numbers can somebody givme a hang with this please.
thanks [email protected]








 
Old April 14th, 2005, 12:56 AM
Registered User
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to anandp
Default

Well i think that you should use string comparing function
rather than using == in if().Try with something like string.Equals("xyz"). If your prob get solved Plz reply me at

[email protected]

Anand Pritam
Software engineer
(bangalore)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get error codes using java program kasipandian Spring 1 August 13th, 2008 12:57 AM
how to create a program autostart suhaoyuan C# 6 September 10th, 2006 04:20 AM
Please Help Create Java Program!! Tigermoney JSP Basics 4 April 18th, 2004 09:21 PM
How to create a search program? kyootepuffy Classic ASP Basics 4 August 25th, 2003 08:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.