<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Interactive web pages in MATLAB, part 3</title>
	<atom:link href="http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/</link>
	<description>Mike works on the MATLAB Desktop team</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:17:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Yonatan</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7265</link>
		<dc:creator>Yonatan</dc:creator>
		<pubDate>Wed, 25 Aug 2010 06:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7265</guid>
		<description>Hi,
I&#039;m trying to get the text from a page with iFrames.
I&#039;m using this code:

&lt;pre&gt;
cbStr = [&#039;jObject = com.mathworks.mlwidgets.html.HTMLBrowserPanel;&#039; ...
    &#039;[browser,container] = javacomponent(jObject, [], handles.figure1);&#039;...
    &#039;set(container,  &#039;&#039;Pos&#039;&#039;,[100,200,500,250]);&#039;...
    &#039;handles.logBrowser = browser;&#039;...
    &#039;handles.logContainer = container;&#039;];
eval(cbStr);
handles.logBrowser.setCurrentLocation(sURL);
&lt;/pre&gt;

when I type:
&lt;pre&gt;
s = char(handles.logBrowser.HTMLRenderer.getHtmlText)
&lt;/pre&gt;

I get only the text of the main URL. Is there an option to get the text from the iFrame? 

I guess I could try getting the text straight from the iFrame&#039;s url (i.e. sURL = iFrame URL) but a script is running on this iFrame and I need its results in real time (i.e. when the whole &quot;parent&quot; page loads). So my question is - is there a way to access the iFrame&#039;s text when I have the &quot;parent&quot; page as the &quot;currentLocation&quot;?

Thanks in advance


&lt;pre&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m trying to get the text from a page with iFrames.<br />
I&#8217;m using this code:</p>
<pre>
cbStr = ['jObject = com.mathworks.mlwidgets.html.HTMLBrowserPanel;' ...
    '[browser,container] = javacomponent(jObject, [], handles.figure1);'...
    'set(container,  ''Pos'',[100,200,500,250]);'...
    'handles.logBrowser = browser;'...
    'handles.logContainer = container;'];
eval(cbStr);
handles.logBrowser.setCurrentLocation(sURL);
</pre>
<p>when I type:</p>
<pre>
s = char(handles.logBrowser.HTMLRenderer.getHtmlText)
</pre>
<p>I get only the text of the main URL. Is there an option to get the text from the iFrame? </p>
<p>I guess I could try getting the text straight from the iFrame&#8217;s url (i.e. sURL = iFrame URL) but a script is running on this iFrame and I need its results in real time (i.e. when the whole &#8220;parent&#8221; page loads). So my question is &#8211; is there a way to access the iFrame&#8217;s text when I have the &#8220;parent&#8221; page as the &#8220;currentLocation&#8221;?</p>
<p>Thanks in advance</p>
<pre>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7060</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 25 May 2010 13:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7060</guid>
		<description>@esmitt,

 Does the sinewave.png ever get created? Can you create one at the command line using the &lt;tt&gt;print&lt;/tt&gt; command?
&lt;pre class=&quot;code&quot;&gt;
surf(peaks)
print(&#039;sinewave.png&#039;,&#039;-dpng&#039;);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@esmitt,</p>
<p> Does the sinewave.png ever get created? Can you create one at the command line using the <tt>print</tt> command?</p>
<pre class="code">
surf(peaks)
print('sinewave.png','-dpng');
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: esmitt</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7036</link>
		<dc:creator>esmitt</dc:creator>
		<pubDate>Tue, 18 May 2010 19:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-7036</guid>
		<description>hi Mike, i have problems when run your example. I&#039;m using R2008 version but after push a button in Matlab browser appears &quot;Warning - File or URL Not Found&quot;. The file sinewave.png was not found, I mean, it wasn&#039;t created.Can you help me? 

Thanks</description>
		<content:encoded><![CDATA[<p>hi Mike, i have problems when run your example. I&#8217;m using R2008 version but after push a button in Matlab browser appears &#8220;Warning &#8211; File or URL Not Found&#8221;. The file sinewave.png was not found, I mean, it wasn&#8217;t created.Can you help me? </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6300</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 22 Jun 2009 14:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6300</guid>
		<description>Answer to @Ashwin up in new post: &lt;a href=&quot;http://blogs.mathworks.com/desktop/2009/06/22/interactive-web-pages-in-matlab-part-4/&quot; rel=&quot;nofollow&quot;&gt;http://blogs.mathworks.com/desktop/2009/06/22/interactive-web-pages-in-matlab-part-4/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Answer to @Ashwin up in new post: <a href="http://blogs.mathworks.com/desktop/2009/06/22/interactive-web-pages-in-matlab-part-4/" rel="nofollow">http://blogs.mathworks.com/desktop/2009/06/22/interactive-web-pages-in-matlab-part-4/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashwin</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6278</link>
		<dc:creator>Ashwin</dc:creator>
		<pubDate>Wed, 03 Jun 2009 04:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6278</guid>
		<description>Well thanks Mike for your reply. I needed it urgently since I have to get the demo ready at a conference in july. I am thinking of working arnd in the sense.. Calling Matlab from Javascript like u said and passing 4 values into my algorithm. then copyin the algorithm returned values into a file and then calling this file into my html using ajax or something. I dunno if its possible(given I am Elec Engg Major who doesnt ve good knowledge of anything except matlab)...but i will give it a try. If you can give me a solution or perhaps email me on the ID above.it would work wonders..

Thanks
Ashwin</description>
		<content:encoded><![CDATA[<p>Well thanks Mike for your reply. I needed it urgently since I have to get the demo ready at a conference in july. I am thinking of working arnd in the sense.. Calling Matlab from Javascript like u said and passing 4 values into my algorithm. then copyin the algorithm returned values into a file and then calling this file into my html using ajax or something. I dunno if its possible(given I am Elec Engg Major who doesnt ve good knowledge of anything except matlab)&#8230;but i will give it a try. If you can give me a solution or perhaps email me on the ID above.it would work wonders..</p>
<p>Thanks<br />
Ashwin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6277</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 02 Jun 2009 15:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6277</guid>
		<description>Ashwin,

 It is possible, but complicated. I have at least one viable solution for this, but its too intricate to post as comment here. I&#039;ll add it to my queue of future posts and try to get to it before R2009b drops with all its new features.</description>
		<content:encoded><![CDATA[<p>Ashwin,</p>
<p> It is possible, but complicated. I have at least one viable solution for this, but its too intricate to post as comment here. I&#8217;ll add it to my queue of future posts and try to get to it before R2009b drops with all its new features.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashwin</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6266</link>
		<dc:creator>Ashwin</dc:creator>
		<pubDate>Fri, 29 May 2009 17:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6266</guid>
		<description>Hi Mike,

This tutorial is very helpful. How ever..How about I need to return Matlab Values back to Javascript..for instance I need to have somethign like this

on the browser
Input 1st Number:
Input 2nd Number:

Result:

Now When the user enters numbers 1 and 2…..javascript will call matlab and Matlab will compute the result(for eg Add) and return the result back to the Result box.

I knw how to pass values from JS to Matlab..But how to do it vice versa.

My primary aim for this is as follows.

I am sending X and Y coordinates from JS to Matlab. I have an Algorithm ready in Matlab which will take these values and give a result and this result needs to passed back to JavaScript..


Sorry I might have posted it in a different comments section :(

This is the final stage of my project. When I am finished, I will upload u the link and you can check it out. Its basically a Unmanned Air vehicle and target threat detection scenario....with Google Earth API(Hence JavaScript) and Communication Algorithm(Hence Matlab)..</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>This tutorial is very helpful. How ever..How about I need to return Matlab Values back to Javascript..for instance I need to have somethign like this</p>
<p>on the browser<br />
Input 1st Number:<br />
Input 2nd Number:</p>
<p>Result:</p>
<p>Now When the user enters numbers 1 and 2…..javascript will call matlab and Matlab will compute the result(for eg Add) and return the result back to the Result box.</p>
<p>I knw how to pass values from JS to Matlab..But how to do it vice versa.</p>
<p>My primary aim for this is as follows.</p>
<p>I am sending X and Y coordinates from JS to Matlab. I have an Algorithm ready in Matlab which will take these values and give a result and this result needs to passed back to JavaScript..</p>
<p>Sorry I might have posted it in a different comments section :(</p>
<p>This is the final stage of my project. When I am finished, I will upload u the link and you can check it out. Its basically a Unmanned Air vehicle and target threat detection scenario&#8230;.with Google Earth API(Hence JavaScript) and Communication Algorithm(Hence Matlab)..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6203</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 24 Apr 2009 13:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6203</guid>
		<description>Thuy,

 I am not entirely sure of what you want. If you are looking for a hyperlink to open a new or particular figure window in MATLAB, you can use the &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/figure.html&quot; rel=&quot;nofollow&quot;&gt;&lt;tt&gt;figure&lt;/tt&gt;&lt;/a&gt; command and associate that figure&#039;s handle with the hyperlink. 

If you want to have multiple plots in your web page, then try creating a separate &lt;tt&gt;iframe&lt;/tt&gt; for each plot.</description>
		<content:encoded><![CDATA[<p>Thuy,</p>
<p> I am not entirely sure of what you want. If you are looking for a hyperlink to open a new or particular figure window in MATLAB, you can use the <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/figure.html" rel="nofollow"><tt>figure</tt></a> command and associate that figure&#8217;s handle with the hyperlink. </p>
<p>If you want to have multiple plots in your web page, then try creating a separate <tt>iframe</tt> for each plot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thuy</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6200</link>
		<dc:creator>Thuy</dc:creator>
		<pubDate>Thu, 23 Apr 2009 16:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-6200</guid>
		<description>Hi, I am creating 4 hyperlinks, and each shows a different plot.  However, I don&#039;t know how to create different windows for each plot.  
I want this:

If I click on hyperlink_1, I will see plot_1

Then I don&#039;t close that window, and I click on hyperlink_2, and I see another figure window with plot_2

Currently, when I click on the hyperlink consecutively, each plot overwrite the previous one.  I don&#039;t want this.  


Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, I am creating 4 hyperlinks, and each shows a different plot.  However, I don&#8217;t know how to create different windows for each plot.<br />
I want this:</p>
<p>If I click on hyperlink_1, I will see plot_1</p>
<p>Then I don&#8217;t close that window, and I click on hyperlink_2, and I see another figure window with plot_2</p>
<p>Currently, when I click on the hyperlink consecutively, each plot overwrite the previous one.  I don&#8217;t want this.  </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ali</title>
		<link>http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-4378</link>
		<dc:creator>ali</dc:creator>
		<pubDate>Fri, 02 May 2008 17:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2008/02/25/interactive-web-pages-in-matlab-part-3/#comment-4378</guid>
		<description>Hi Mike:
I have Matlab 2006a. So could I use Matlab webserver for this issue 
Actually, I do not have background on this topic but I am keep reading some documents from the net.</description>
		<content:encoded><![CDATA[<p>Hi Mike:<br />
I have Matlab 2006a. So could I use Matlab webserver for this issue<br />
Actually, I do not have background on this topic but I am keep reading some documents from the net.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

