cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Javascript valuable as EPCM.doRelativeNavigation para?

Former Member
0 Kudos

I have hard time getting the Var pageID below as a parameter in:

EPCM.doRelativeNavigate();

The coma ,the slash coma , single quote, double quote between html, javascript is really confused me.

This code is from a html file, which is a source file for a html renderer;





<A HREF="moreLink"
onclick="
   
  javascript:'
  var iViewID=parent.pageSupport.getIvuId(self); 
  alert(iViewID);


  var rid = iViewID.replace('pcd:' ,'ROLES://');
  alert(rid);


  var iviewname= iViewID.substring(iViewID.lastIndexOf('.')+1,iViewID.length);
  alert(iviewname);

  var pageID = 'nvidia.pr.page.' + iviewname;
  alert(pageID);

  return EPCM.doRelativeNavigate(rid,2,'{pageID}',0,'', '', '', '','','',null);
  
  '

">
More</A>

When I do a : alert(pageID), the value is the right one I need. But I just can't get it as an input in my doRelativeNavigate function.

Thanks for help.

Kent

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I found a stupid mistake I made.

The right code is:


<A HREF="moreLink"
onclick="
   
  var iViewID=parent.pageSupport.getIvuId(self); 
  alert(iViewID);
 
 
  var rid = iViewID.replace('pcd:' ,'ROLES://');
  alert(rid);
 
 
  var iviewname= iViewID.substring(iViewID.lastIndexOf('.')+1,iViewID.length);
  alert(iviewname);
 
  var pageID = 'nvidia.pr.page.' + iviewname;
  alert(pageID);
 
  return EPCM.doRelativeNavigate(rid,2,'{' +pageID+'}',0,'', '', '', '','','',null);
  

 
">
More</A>


The mistake is at:

return EPCM.doRelativeNavigate(rid,2,'{' pageID'}',0,'', '', '', '','','',null);

The previous one: '' I treated the pageID as a part of string ''.

Haha...I was on the blind spot.

Kent