Skip to Content
Former Member
Mar 25, 2010 at 11:44 AM

Issue in Preview through XML forms having TinyMCE editor


Hello Experts,

I have one issue in our client portal, which is really giving me hard time to resolve.

So I have come to you experts for helping me to resolve this issue.

So below are the details of the issue.

Actually it goes like that, we are using B.Texx Framework in our Client Portal Environment and most of the work is done by the users in the portal, who has author rights. Please note that Authors have the right to Edit and save the content.

Most of the things are made on XML forms, with the help of Java Scripts.

Now there is one XML form(Add General Content), through which users add the general contents and there is one template provided to the user for that content. The XML forms are integrated here with the Tiny MCE editor.

Now, there is one link (Insert/edit link) in the Tiny MCE editor, when we write some text in the body and select the text, the link in the editor gets activated and when we click on the link, a pop up comes up, in which there is a browse button, through which we select the Navigation Element Link , which takes us in the navigation of the portal content(the way it is viewed by user in the portal according to the roles ), showing us different content and we select an content and press finished. Now the selected text becomes as a link in the body of xml form, then we fill up the title and there is one preview button. When we click on the preview button, the link is displayed to us.But when we click on that link nothing happens.

Please note that if we save that form, the links appears on portal and we are able to navigate through the link.

For this I have checked the js file(xmlformpreview_redirect.js) responsible.I am sharing the code of the js file below.


// author llaegner

// Get current URL of XML Forms Preview

// This Javascript should be included in the ShowForm Formular (old XSL Style)

// in xml forms builder in a label-field in the attribute caption

// this javascript file is then called by the Preview Button on an Edit Form, because the ShowForm is launched automatically always

// changes by ekaraca

// Add a if-Control so a redirect will work by clicking the xml file as well

var currentURL=top.location.href;

var redirectURL="";

var startOfParameters=currentURL.indexOf("?");

if (startOfParameters < 0) startOfParameters=currentURL.indexOf("%3F");

if (startOfParameters > 0) {

// Provide all parameters for SAP original preview iview to our new iview



if(currentURL.substring(currentURL.length-4)==".xml") {

var xmluri = currentURL.substring(currentURL.indexOf("/irj")+15, currentURL.length); /* /irj/go/km/docs <---- 15 letters */




else {

// If we have found something to redirect

if (redirectURL.length > 1) {

// Change current location and switch immediately to new iview





I would really appreciate if any of you experts help me resolve this issue.

So I am eagerly waiting for the response from all of you experts present here.