cancel
Showing results for 
Search instead for 
Did you mean: 

href and doNavigate

Former Member
0 Kudos

what is the difference betweeen using normal <A HREF> tag and using EPCM.doNavigate() to redirect to some page?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Shiva,

<A HREF> tag is used to link to a file on a Web server, As long as you know the URL for a file, you can create a link to it. And as user click on it will open the link.

EPCM.doNavigate() is a navigation API and uised to navigate inside the portal. But the only difference is that EPCF works only for <b>content from same domain</b>. This is actually limitation of javascript and hence EPCF.

Well for your information

We can use the combination of both an dit has been used in Portal also,

The solution implemented for secondary links in the portal component uses a combination of a HTML hyperlink and a call of a EPCF service method EPCM.doNavigate().

<A HREF="myLink" onclick="return EPCM.doNavigate('target')">

This is HTML Link</A>

The String parameter target represents the location of an iView or a page in the role. The value is available from the portal content catalog.

Hope this clear your doubt.

PS: If helpful award points.

--Deepak

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi shiva,

Deepak has given a good explanation. Just to add on, <a href> is html tag and can be used in any web page but EPCM.doNavigate() works only in portal pages. Using <a> tag is better in the aspect Javascript can be avoided.

Regards,

Harini S

Former Member
0 Kudos

Shiva,

In addition to what Deepak said.

<A HREF= > is basic tag for HTML. but EPCF is a javascript library provided for Portal Navigation.

Is there any specific thing you want to understand ?

Regards,

Piyush

ps: please mark for all useful answers.