Could that possibly be an IIS thing (or Apache if that's what you're using)?
I've never had IE put something other than what I told it to when I
manipulate the DOM like that. Of course, I'm using
jQuery<http://jquery.com>these days to accomplish this sort of thing,
but even before that when I
wasn't I never saw this happen before. I have to admit to not using anchor
tags in my apps too much. I typically bind an element to the click event, so
I could be wrong about all this.

Good luck!
Chris

On 7/18/07, Claude Schneegans <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I know this is a CF list, but who uses CF without Javascript? ;-)
>
> Here is the problem:
>
> I have an online HTML editor which works pretty well, except that any
> relative href addresses are
> transformed into absolute addresses, ie : href="mypage.htm" becomes
> href="http://mySite/directoryOfTheTextEditor/mypage.htm";
>
> Apparently, setting the innerHTML is the source of the problem.
>
> The code below illustrates the problem:
>
> <SCRIPT>
> function setHTML()
> {
> var div = document.getElementById("testDiv");
> div.innerHTML = '<A href="test.htm">Test href</A>'
> alert(div.innerHTML)
> }
> </SCRIPT>
> <INPUT NAME="test" TYPE="button" SIZE="10" VALUE="test"
> onClick="setHTML()">
> <DIV id="testDiv">test</DIV>
>
> When someone clicks on the button, <A href="test.htm"> is inserted into
> the innerHTML of the div,
> however, the alert then shows <A href="http://localhost/test/test.htm";>
>
> This problem is with IE 6, with FireFox the address is unchanged; under
> IE 7, I don't know.
>
> Does someone know some way I could get IE to mind its own business?
>
> I'm able to manage my addresses myself ;-)
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284036
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to