Jump to content

TextBox Insert

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Bioshox

Bioshox

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 207 posts
Hey guy

Okay, I want to add <b> </b> tags into a textbox without removing the current text there

I currently have the code

<script type="text/javascript" language="javascript"><!--


function ChgText()

{

   var MyElement = document.getElementById("content");

   MyElement.value = "<b>  </b>";


   return true;

}


//--></script>

	

	<p>

	<form action='addpost.php' method='post'>

	<h3>Title:</h3>

	<input type="button" onclick="ChgText()" value="b"/><br/>

	<input type='text' name='title' size='63.5' /><br>

	<h3>Body:</h3> 

	<textarea id='content' name='content' rows='15' cols='50'></textarea>

	<br>

	<input type='submit' name='submit' value='Publish' />

	</p>


What need's adding to this to make it work correctly?

Thanks
Shox.

#2
Bioshox

Bioshox

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 207 posts
Anyone D:?