Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Web client: (4 Items)
   
Web client  
I have a problem in using photon..

I want to ask how to make web client widget to open a web (ex:google.com) automatically when the GUI start?

I can't use Pt_ARG_WEB_GET_URL.

Thanks.
Re: Web client  
here the script..

{
	PtArg_t args[ 2 ];
	char tmp[300];
	sprintf(tmp,"file:///home/google.html");
	PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "vserver", 0 );
	PtSetResources( ABW_web, 1, args );
	PtSetArg(&args[0],Pt_ARG_WEB_GET_URL,tmp , Pt_WEB_ACTION_DISPLAY );
	PtSetResources( ABW_web, 1, args);
	PtSetArg( &args[0],Pt_ARG_WEB_GET_URL, "www.google.com",Pt_WEB_ACTION_DISPLAY);
	PtSetResources( ABW_web, 1, args );
	return( Pt_CONTINUE );
}
why when I run the html file can''t be load. I already link web start and web URL to the script above..

thanks ^_^
Re: Web client  
> I have a problem in using photon..
> 
> I want to ask how to make web client widget to open a web (ex:google.com) 
> automatically when the GUI start?
> 
> I can't use Pt_ARG_WEB_GET_URL.
> 
> Thanks. 

here the script..

{
	PtArg_t args[ 2 ];
	char tmp[300];
	sprintf(tmp,"file:///home/google.html");
	PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "vserver", 0 );
	PtSetResources( ABW_web, 1, args );
	PtSetArg(&args[0],Pt_ARG_WEB_GET_URL,tmp , Pt_WEB_ACTION_DISPLAY );
	PtSetResources( ABW_web, 1, args);
	PtSetArg( &args[0],Pt_ARG_WEB_GET_URL, "www.google.com",Pt_WEB_ACTION_DISPLAY);
	PtSetResources( ABW_web, 1, args );
	return( Pt_CONTINUE );
}
why when I run the html file can''t be load. I already link web start and web URL to the script above..

thanks ^_^

Re: Web client  
Hi Afif,

Please try following code:

PtArg_t args[1];
int *error;

PtSetArg( &args[0], Pt_ARG_WEB_SERVER, "online", 0);
PtSetResources( ABW_PtWebClient1, 1, args );

PtSetResource( ABW_PtWebClient1, Pt_ARG_WEB_GET_URL, "www.qnx.com", Pt_WEB_ACTION_DISPLAY); 


Also check configuration file /etc/photon/webservers. It should contain a line for Pt_ARG_WEB_SERVER. E.g.
online = /opt/mozilla/firefox/bin/run-mozilla.sh /opt/mozilla/firefox/bin/mozserver,MozillaServer


Best regards,
Fedor