Okay, I feel like a total idiot now. I am opening a modal dialog window and in the dialog I'm trying to change the location.href of the parent window. When I try parent.location.href = 'blah.htm'; it opens a new window with blah.htm inside. Why is it opening in a new window?
Thanks,
Jason
Jeff,
The HTML at the top of the thread is in the variable content. Yes, I am trying to remove the source code DFN and everything in between. Sorry I didn't specify this before.
Thanks,
Jason
I have the following HTML:
<P>test</P>
<P>test</P><DFN>
<P>test</P></DFN>
I am using the code:
var re = "<dfn>(?:.+)<\/dfn>";
var oReg = new RegExp(re,"igm");
var result = content.replace(oReg, '');
result always comes back with null.
I am trying to remove the DFN and...
Actually, I found an easy was to do this on Googles Groups. Loop through the parents until I find an OL or BODY element. I have tested the code below and it works very well.
var objDOM = element.editor.DOM;
var _currEl = objDOM.selection.createRange();
var objParentElement =...
I pulled this from a Google group thread. Looks like it should work:
Here is a more complete example wich allows ie4/5 to insert previously
selected text into a textarea by clicking at the desired insertion
point. Look at the end of the page:
<HTML>
<HEAD>
<TITLE>
</TITLE>
<STYLE>
</STYLE>...
If I have code like this:
<OL>
<LI>
<FONT face=Arial color=black size=2>asdf</FONT>
</LI>
</OL>
and I'm using the javascript:
var _currEl = objDOM.selection.createRange();
var myobj = _currEl.parentElement();
var myobj2 = myobj.parentElement();
alert(myobj2.tagName);
Why do I not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.