does anyone know
- Started
- Last post
- 6 Responses
- tfsmag
of a javascript function to add tables to an editable iframe?
i'm a javascript n00b when it comes to stuff like this and would appreciate being pointed to a link or a tutorial..
thanks!
- versa0
a starting point for navigating the dom, which will be the most challenging part
http://www.yourhtmlsource.com/ja…
need to look in document.write built in function too
looking for tut ...
- tfsmag0
thx versa.. not exactly what i need though. i need a function or a tutorial that will allow me to add tables to cms wysiwyg editor i'm working on... wysiwyg editors use an editable iframe or div and it uses javascript to perform basic editing functions. i've got it adding images, and formatting text.... the last thing is being able to add tables.
- versa0
oops .. didn't mean to be belittling
still will be using what you prolly already have been using...
document.write and then what tablular structure you needi'll see if i can't find something in my trashcan of a computer
- tfsmag0
i've kinda figured it out.. i'm gonna have to use asp to build the table and then put the table code into a string that i can then stuff into a javascript variable that will insert it into the innerhtml of the editable iframe...
i hope
- versa0
totally riffing on this as i can't find anything when i want to
function writeTable(id)
{
if(document.getElementById){
var tableNew = "\n";var div = document.getElementById(id);
div.innerHTML = "";
div.innerHTML = tableNew;
}
}
- versa0
^
should be:var tableNew = "{table cellpadding=\"foo\" cellspacing=\"foo\" width=\"foo\" height=\"foo\"}
(change brackets above)