I have an html document that has 2 divs (left and right) and the doc loads with some js functions, one function named editme would usually load in the left div, but when the user expands the right nav I want this editme function to launch/open up a new window and do stuff, which means one of the following options would work if possible: 1) destroy the existing function and recreate a new function with the same name 2) change the js function on the fly
Which is possible and how?
Thanks.
Added the following based on suggestions:
edit=function(){} // works, however less value
edit=function(id) { 'window.open("editMe.cfm?taid="+id,"edit","left=260,top=20,height=410,width=590,resizable=1,scrollbars=1")' } // fails
SyntaxError: unterminated string literal
attempted to scape the double quotes like the following to no avail, 'window.open(\"editMe.cfm?taid=\"+id,\"edit\",\"left=260,top=20,height=410,width=590,resizable=1,scrollbars=1\")'
Am I doing something wrong?
fyi, this code is part of other code for the onclick event.