Hey
I bet someone can help me here.
I am using javascript and I am trying to set a variable equal to a textarea, so that I can use whatever I put in the textarea and replace parts of it after a certain way.
My code (that does not work)
<html>
<head>
<script type="text/javascript">
function replace()
{
var txt=document.getElementsByTagName("*what goes in here???*");
alert(txt);
document.write(txt.replace(/something/g, "somethingelse"));
}
</script>
</head>
<body>
<form id="textarea" onsubmit="replace()">
<textarea rows="10" cols="30">
TEXTTEXTTEXT
</textarea>
<input type="submit" id="submit" value="Submit" />
</form>
</body>
</html>
----------------------------------------------------------------------------------
The other problem I have:
I am trying to execute a javascript function, and this function should include a .php text file on the current page.
(So that it would work like a php include)
But any way I try, my javascript code does not work.
Any suggestions?
Thanks for your help
Symasta