when i want use some html codes into the some scripts, then it doesn't work or visitor just see source of HTML that i inserted! no its effect ... sample problem: <script type="text/javascript"> var sayHello = new LiveValidation('sayHello', { validMessage: '<br/><a href="index.html"><img src="hello.jpg" border="0" valign="bottom"></a>', wait: 500}); sayHello.add(Validate.Presence, {failureMessage: "test"}); sayHello.add(Validate.Format, {pattern: /^hello$/i, failureMessage: "test" } ); </script> Code (markup): do i need use document.write to cover HTML codes ? then its working ?
I'm really no expert at JavaScript (My JS knowledge extends as far as being able to copy/paste from Dynamic Drive). However, have you tried using document.write - http://www.mediacollege.com/internet/javascript/basic/document-write.html ? Perhaps you'd get a better response if you waited a little more than 4 hours for a reply and tried the JavaScript Forum