Path: news.mathworks.com!not-for-mail
From: "karthikeyan " <kanandhi2k@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Hyperlink in Web Browser and ActiveXControl
Date: Tue, 27 Jan 2009 14:36:02 +0000 (UTC)
Organization: Emmeskay Inc
Lines: 27
Message-ID: <gln64i$9hp$1@fred.mathworks.com>
References: <famka8$5k7$1@fred.mathworks.com> <famovi$l5o$1@fred.mathworks.com> <famppt$4q8$1@fred.mathworks.com> <faq1j7$pj0$1@fred.mathworks.com> <fatt20$cuj$1@fred.mathworks.com> <glmeqc$gt2$1@fred.mathworks.com> <glmhpv$7if$1@fred.mathworks.com>
Reply-To: "karthikeyan " <kanandhi2k@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233066962 9785 172.30.248.35 (27 Jan 2009 14:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Jan 2009 14:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1096717
Xref: news.mathworks.com comp.soft-sys.matlab:514240


"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message <glmhpv$7if$1@fred.mathworks.com>...
> > 1. I need to know the way to get the selected text in the html file. I mean that if i would select some text using mouse in the displayed html file. How do i get it? what's the way from browser data structure.
> 
> url = 'www.cnn.com';
> browser = com.mathworks.mlwidgets.html.HTMLBrowserPanel(url);
> pos = [10,10,400,300];
> javacomponent(browser,pos,gcf);
> 
> browserCanvas = browser.getHTMLRenderer.getComponent(0).getComponent(0);
> browserCanvas.getSelectedText;
> 
> > 2. If i display the multiple html files in the same browser, I need to switch between the html file without refreshing(It's mandatory). Of course, I can addToolbar where i can click Back and Forward buttons, But i need an API to invoke Back and Forward
> 
> browser.setCurrentLocation('www.bbc.com');
> browserCanvas.goBack;      % =>CNN, use browserCanvas.getURL to check
> browserCanvas.goForward;  % =>BBC, use browserCanvas.getURL to check
> 
> The exact methods/properties of browserCanvas may depend on your default browser.
> 
> Yair Altman
> http://ymasoftware.com

Hi Yair Altman,

Yes, It's work well. But if i would load the multiple(more than six) html files, it's not working exactly. I just added pause command before loading(using setCurrentLocation) each file.

I couldn't see the location bar in the browser I feel it would be better to view the file URL in location bar( or is it an address bar) as there are multiple files.