Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ajax and content editor

Status
Not open for further replies.

WebRic

Technical User
Joined
Sep 21, 2004
Messages
95
Location
GB
Hi all,

I have a form with a series of fields. When a user selects an option in the first menu, I use ajax to populate the rest of the fields by grabbing this content form another file i.e.:
Code:
formObj.pageTitle.value = "Home Page";
formObj.linkTitle.value = "Home";
formObj.alternativeLink.value = "/index.cfm";

This all works fine. The problem happens when I try to grab the data for my HTML editor. Some of the code in the HTML is causing the javascript to run an error. I've tried replacing all double quotes with single quotes but as expected this wasn't enough.

Does any one have any ideas on how to make this work or a better way of doing this?

Thanks,


Richard
 
Can you not simply cut down the HTML that your program is trying to grab bit by bit, until it works... which should make it really obvious to see what is causing the error?

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks Dan I figured it out. I basically had to convert all < to &lt; and the same for &gt;.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top