Ik heb deze stukjes script:
Javascript
/*-------------------------------------------------------------------------*/
// SIMPLE TAGS (such as B, I S U, etc)
/*-------------------------------------------------------------------------*/
function simpletag(thetag)
{
var tagOpen = opentags[ thetag ];
if ( get_easy_mode_state() )
{
inserttext = prompt(prompt_start + "\n[" + thetag + "]xxx[/" + thetag + "]");
if ( (inserttext != null) && (inserttext != "") )
{
wrap_tags("[" + thetag + "]" + inserttext + "[/" + thetag + "] ", "", false);
}
}
else
{
if ( tagOpen == 0 )
{
if ( wrap_tags("[" + thetag + "]", "[/" + thetag + "]", true ) )
{
//--------------------------------------------
// Toggle
//--------------------------------------------
toggle_button( thetag );
pushstack(bbtags, thetag);
}
}
else
{
//--------------------------------------------
// Smart close tags
//--------------------------------------------
smart_close_tags( thetag );
}
}
}
Html + Javascript
<img src="icoontjes/quote.gif" width="21" height="21" alt="Maak een aanhaling" title="Maak een aanhaling" onclick="simpletag('quote')">
Dat werkt dus wel, maar als ik er zelf eentje bij maak zoals:
<img src="icoontjes/subscript.gif" width="25" height="24" alt="Subscript" title="Subscript" onclick="simpletag('sub')">
Dán werkt het niet. Hoe kan dit?