Computing.Net > Forums > Programming > word translation program

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

word translation program

Reply to Message Icon

Name: fleetmack
Date: January 30, 2008 at 10:10:05 Pacific
OS: xp
CPU/Ram: fast
Product: name brand
Comment:

as a gag for a friend (inside joke) i want to write a simple web-based program where any word (or sentence) she types in, it'll change all the vowels to the string "aah" and display everything else as normal. This seems as though it should be simple to do but I'm not really sure where to start. Can anybody point me in the right direction?



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: January 30, 2008 at 13:10:22 Pacific
Reply:

I don't think anyone here is going to tell you how to write sosme malware regardless of how benign your intentions may be.

There will be too many people who will read it who's intentions are less than benign.

Stuart


0

Response Number 2
Name: fleetmack
Date: January 30, 2008 at 16:25:11 Pacific
Reply:

thanks for the positive response, glad you know my intentions and everything i intend to do with things to make a friend laugh.


0

Response Number 3
Name: Razor2.3
Date: January 30, 2008 at 17:30:32 Pacific
Reply:

Your options will be dependent on the scripting languages at your disposal.


0

Response Number 4
Name: fleetmack
Date: January 30, 2008 at 17:40:29 Pacific
Reply:

PHP would be a wonderful option for me. Basically i realize I could create a function like:

function toAHH($c){
switch($c) {
case 'a': case 'A':
return "aah";
case 'b': case 'B':
return "b";
case 'c': case 'C':
return "c";
default:
return " "; }}

I can create the function, but I don't know how to link it to a form. Say I have a text box where a user inputs the text, then they click submit, I want it to translate the code and return it in that same box. Seems basic but I'm a database programmer, don't know much of this kind of stuff.


0

Response Number 5
Name: Razor2.3
Date: January 30, 2008 at 18:42:30 Pacific
Reply:

Unfortunetly, I don't have much knowledge of PHP beyond PHP 101, so I'm not much help.

I do, however, have a passible knowldege of javaScript (I hope the forum's parser doesn't kill this):

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Untitled</title></head>
<body>
<form action="">
<p>
<textarea name="txt" cols="50" rows="10"></textarea>
<br />
<input type="button" name="btn" value="Go"
onclick="txt.value = txt.value.replace(/[aeiou]/gi,'aah')" />
</p>
</form>
</body>
</html>


0

Related Posts

See More



Response Number 6
Name: Mechanix2Go
Date: January 31, 2008 at 03:46:58 Pacific
Reply:

"I hope the forum's parser doesn't kill this)"

LOL



=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 7
Name: fleetmack
Date: January 31, 2008 at 10:27:45 Pacific
Reply:

holy cow you rule razor!! THANKS!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

check on zero byte file batch file not working



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: word translation program

OBDC drivers / program and Windows 98 www.computing.net/answers/programming/-obdc-drivers-program-and-windows-98-/1645.html

Another program to display code www.computing.net/answers/programming/another-program-to-display-code/2736.html

How can get text from object www.computing.net/answers/programming/how-can-get-text-from-object/830.html