Hi, i have this function i am making and would like to convert all the occurances of --------[newstep]-------- into <table><tr><td bgcolor=#CCCCCC>test</td></tr></table>
any ideas??
Regards,
Martin
Computing Help And Info:
Code:
function updatePreview(){
var tf = document.form1;
var p = document.getElementById("preview");
var theTxt = tf.tutorial.value;
theTxt.replace(/--------[newstep]--------/,"<table><tr><td bgcolor=#CCCCCC>test</td></tr></table>");
var str = theTxt; // + pp;
p.innerHTML = str;
}
Regards,
Martin
Computing Help And Info: