Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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?

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

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

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.

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>

"I hope the forum's parser doesn't kill this)"
LOL
=====================================
If at first you don't succeed, you're about average.M2

![]() |
check on zero byte file
|
batch file not working
|

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