We tried to execute a JavaScript string by setting for example the URL "javascript:alert()" on S60 3rd edition FP2.

Using:
1) S60 3rd Edition FP2 SDK
2) Carbide IDE


We tried using the BrCtlSampleApp sample application to execute CBrctlInterface loadUrlL method.but the JavaScript alert did not pop up. We next tried NPAPI to set the URL using NPN_GetURL. We were able to compile our project with snippet shown below:

Eg :
NPError npError = NPP_Initialize();
_LIT(KBlankUrl, "_blank");
npError = NPN_GetURL(instance, KUrl, &KBlankUrl);

However, we were not able to link with this snippet. We get the following error:

Undefined symbol: 'short NPN_GetURL(struct _NPP *, class TDesC16 const
&, class TDesC16 const *)
(?NPN_GetURL@@YAFPAU_NPP@@ABVTDesC16@@PBV2@@Z)'
Undefined symbol: 'short NPP_Initialize(void)
(?NPP_Initialize@@YAFXZ)'

I have included the browserengine.lib.

Can we use NPAPI directly in S60 3rd edition FP2 ? If so how can we use it, is there a lib or DLL available to access the NPAPI methods?