Jump to content

Its Ben A While And I Have A ?


TKW22
 Share

Recommended Posts

i haven't used javascript in a while so i have a ?how can i make bbcode buttons that pop up on the screen i have done this before just cant seem to remember.than after that insert it into a text box?

Link to comment
Share on other sites

what do you mean by bbcode butons that pop up on a screen?As for a textarea
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled</title><script language=JavaScript type=text/javascript><!--function hi() {document.getElementById('juju').innerHTML+= "[ b ]"+document.getElementById('gug').value+"[ / b ]";}function show () {document.getElementById('show').style.display='block';}function hide() {document.getElementById('show').style.display='none';}//--></script><style type="text/css">#show {display: none;position: absolute;z-index:10;}</style></head><body><button type="" onclick="show()">bold</button><div id="show"><input type="text" id="gug"/> <button onclick="hi();hide()">done</button></div><textarea rows="5" cols="40" id="juju"></textarea></body></html>

sorry about the mess ill fix it later.what i want is so i don't need to make so many show and hide functions for each bbcode

Edited by TKW22
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...