Forum Moderators: open

Message Too Old, No Replies

Form buttons

         

mrTee

5:53 pm on Dec 11, 2004 (gmt 0)



Hi!

I'm making a simple form, and was wondering if any of you guys could give me a pointer on how to make those buttons to add bold tags, hyperlinks etc. to the form using a popup window?

orion_rus

8:00 am on Dec 12, 2004 (gmt 0)

10+ Year Member



Oh it's now problem at all))
You have form and some editable points in it. Written like so:
<input id="edittext" type="text">
and some buttons like
<input type="button" value="Add Bold">
<input type="button" value="Add Itallic">
and so on
All u need is to add follows

<html>
<head>
function addtag(tag)
{editing=document.getElementById('edittext');
editing.value+=tag;
}
</head>
<body>
<input id="edittext" type="text">
<input type="button" value="Add Bold" onclick="addtag("[b]">
<input type="button" value="Add Itallic" onclick="addtag("[i]")>
</body>

That's all i think good luck to you