<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Application Developer &#187; JAVA/JSP</title>
	<atom:link href="http://applicationdeveloper.net/category/java-jsp/feed/" rel="self" type="application/rss+xml" />
	<link>http://applicationdeveloper.net</link>
	<description>Making money online</description>
	<lastBuildDate>Sat, 26 Sep 2009 20:31:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calling #PHP on #JSP / #Java Pages with Javascript &#8211; #js</title>
		<link></link>
		<comments>http://applicationdeveloper.net/2009/07/18/calling-php-jsp-java-pages-javascript-js/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 16:34:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[JAVA/JSP]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tweaks]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://applicationdeveloper.net/?p=74</guid>
		<description><![CDATA[Working with hacked together management systems that utilize both Java/JSP and PHP can be extremely annoying. However, jQuery has made our lives a lot easier by letting us call PHP using Javascript.Most of us are script kiddies. Admit it, we like to build our own tools but whenever a shortcut comes into play, we take [...]]]></description>
			<content:encoded><![CDATA[Working with hacked together management systems that utilize both Java/JSP and PHP can be extremely annoying. However, jQuery has made our lives a lot easier by letting us call PHP using Javascript.<br /><br /><img class="alignnone size-full wp-image-76" style="float:right;" title="java" src="http://applicationdeveloper.net/wp-content/uploads/2009/07/java.jpg" alt="java" width="90" height="119" />Most of us are script kiddies. Admit it, we like to build our own tools but whenever a shortcut comes into play, we take the high road. Can you really blame developers for choosing this route when time seems to always be a factor on the Internet. The issue is this leaves us with VERY hacky systems. We piece together and integrate but there are just things we can&#8217;t control. Particularly if we ever end up with anything that&#8217;s not open source.<br /><br />Here&#8217;s a trick for pulling PHP into a JSP run page, or really any page for that matter, as long as it supposed Javascript. Generally speaking, all things support Javascript.<br /><br /><pre class="devcodeblock" title="Javascript"><table class="devcodetools"><tbody><tr><td>&nbsp;Javascript&nbsp;|&nbsp;</td><td style="background-image:url('http://applicationdeveloper.net/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard2" src="http://applicationdeveloper.net/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=2&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&lt;script src=&quot;jquery.js&quot;&gt;&lt;/script&gt; </pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">  $.get(&quot;/location/to/file.php&quot;, function(data) {</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">   $(&quot;#posthere&quot;).html(data);</pre></td></tr><tr><td class="devcodelines" width="1%">7</td><td class="devcodelinesarea"><pre class="devcode devcodeline">  });</pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">8</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">// ]]&gt;&lt;/script&gt;</pre></td></tr><tr><td class="devcodelines" width="1%">9</td><td class="devcodelinesarea"><pre class="devcode devcodeline"></pre></td></tr></table></div></pre>
<br /><br /><a href="http://jquery.com/" target="_blank"><img class="alignnone size-full wp-image-75" style="float:right;" title="jQuery" src="http://applicationdeveloper.net/wp-content/uploads/2009/07/jQuery.jpg" alt="jQuery" width="232" height="67" /></a>Here's how this works. jQuery we should all know. If you don't, go do some reading. It's a big deal.<br /><br />$.get is from jQuery and it will pull the information over and display it.<br /><br />#posthere is key. The<div id="posthere">is where what you want to load will show up. <br /><br />Pretty much from this point you're set. All you need to do is build the PHP file and everything will load up on the JSP pages. Remember, this can applied to any page that supports jQuery or Javascript.</div>]]></content:encoded>
			<wfw:commentRss>http://applicationdeveloper.net/2009/07/18/calling-php-jsp-java-pages-javascript-js/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->