iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
I have <a class="xxxxx" href="#" onclick="javascript:doSomething()"; return false">hello</a> in a webgrid cell, originating from sql server. This script works as intended when exposed on the webpage.
But when this script is inserted in WebTextEditor, which is I have on the same page as the grid and which I use (in multiple sections format) to edit the content of the grid row, WebTextEditor turns the script into: <a class="xxxxx" onclick="function onclick() { function onclick() { function onclick() { doSomething(); return false; } } }" href="#">hello</a>. During update, the script is returned to the grid and sql in this modified format, which now does not work.
In fact, an additional "function onclick() {}" is added around the original function each time you switch between Design and HTML views. In other word, WebTextEditor adds 10 "function onclick() {}" around the original doSomething() if you switch 10 times between Design and HTML views, causing the function to stop working when saved back to the grid/database. Why is this happening?
Regards
Jean
Hello Jean,
I can replicate the issue in here. The issue only happens on IE in HTML doctype. Also, your current script is not well-formatted. It should be:
<a class="xxxxx" onclick="javascript:doSomething(); return false" href="#">hello</a>
Our developer team has fixed the issue. Please apply the attached hotfix. It should fix the issue.
Regards,Handy
Hello Handy,
Thanks for the reply, but the fix has not quite solved the problem.
After installing the hot fix, WebTextEditor now adds only one occurrence of function onclick() {} around each function on the page, regardless of how many times you switch between design and html views. In other words, WebtTextEditor still changes onclick="doSomething();" to onclick="function onclick() {doSomething();}", especially in IE. The part in red should not be added to the function, not even once, as it causes the function to stop working. Please check the fix again.
In you post, you said “The issue only happens on IE in HTML doctype”. Am I supposed to use a different HTML doctype than <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> ?
No, the hotfix already fixed that. It works in here. Have you change your code into the correct format?<a class="xxxxx" onclick="javascript:doSomething();" return false" href="#">hello</a>
changed into
Perhaps, you need also to apply the framework. Here, I reattached both hotfixes for you.
About the doctype, I mean the issue would not happen in XHTML doctype.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname