<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4303012367042792379</id><updated>2011-04-22T01:14:49.332+05:30</updated><category term='PHP'/><category term='colsely coupled code'/><category term='select box'/><category term='value of select'/><category term='xml'/><category term='loosely coupled code'/><category term='what is web 2.0'/><category term='javascript'/><category term='2.0'/><category term='web'/><category term='web 2.0'/><category term='option'/><category term='xslt transform'/><title type='text'>PHP and Javascript Problems and Solutions</title><subtitle type='html'>A set of problems and solutions for PHP and Javascript which may help you while writing code.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4303012367042792379.post-1588146812413096267</id><published>2009-04-16T10:07:00.004+05:30</published><updated>2009-04-16T10:12:03.548+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='web 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='what is web 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>What web 2.0 is ?  How can i make web 2.0 ?</title><content type='html'>Many new webmaster / developers / designers have a question in mind that may be like:&lt;br /&gt;What web 2.0 is ?&lt;br /&gt;How can i make web 2.0 ?&lt;br /&gt;..etc etc&lt;br /&gt;&lt;br /&gt;Web 2.0 is the future, it is used mostly to create web applcations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In terms of design using&lt;/span&gt; =&gt;&lt;br /&gt;- glossy&lt;br /&gt;- gradients&lt;br /&gt;- bright colors (most of the time, not always)&lt;br /&gt;- diagonal lines&lt;br /&gt;- bubbly&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In other words&lt;/span&gt; =&gt;&lt;br /&gt;&lt;br /&gt;DoubleClick --&gt; Google AdSense&lt;br /&gt;Ofoto --&gt; Flickr&lt;br /&gt;Akamai --&gt; Bitorrent&lt;br /&gt;mp3.com --&gt; Napster&lt;br /&gt;Britannica Online --&gt; Wikipedia&lt;br /&gt;personal websites --&gt; blogging&lt;br /&gt;evite --&gt; upcoming.org and EVDB&lt;br /&gt;domain name speculation --&gt; search engine optimization&lt;br /&gt;page views --&gt; cost per click&lt;br /&gt;screen scraping --&gt; web services&lt;br /&gt;publishing --&gt; participation&lt;br /&gt;content management systems --&gt; wikis&lt;br /&gt;directories (taxonomy) --&gt; tagging ("folksonomy")&lt;br /&gt;stickiness --&gt; syndication (RSS or Atom)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Table less design also come under web 2.0&lt;br /&gt;Using REST API is also web 2.0&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example of such sites are&lt;/span&gt; :&lt;br /&gt;&lt;br /&gt;Google Adsense&lt;br /&gt;Wikipedia&lt;br /&gt;Orkut&lt;br /&gt;LinkedIn&lt;br /&gt;&lt;br /&gt;This was in my simple words you may &lt;a href="http://en.wikipedia.org/wiki/Web_2"&gt;read more about web 2.0 here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you want to add some thing more just comment on the blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4303012367042792379-1588146812413096267?l=php-js-help.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/1588146812413096267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-js-help.blogspot.com/2009/04/what-web-20-is-how-can-i-make-web-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/1588146812413096267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/1588146812413096267'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/2009/04/what-web-20-is-how-can-i-make-web-20.html' title='What web 2.0 is ?  How can i make web 2.0 ?'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303012367042792379.post-5443573272717578990</id><published>2009-03-26T10:56:00.003+05:30</published><updated>2009-03-26T11:00:04.356+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='colsely coupled code'/><category scheme='http://www.blogger.com/atom/ns#' term='loosely coupled code'/><title type='text'>Closely coupled code Vs Loosely coupled code</title><content type='html'>I saw many of the users don't know meaning of this and there differences. I would like to post it here for the users.&lt;br /&gt;=&gt;&lt;br /&gt;&lt;br /&gt;Basically, closely coupled code means that one part of the code is strongly dependent upon another part. This means that any change in one part may have unforeseen/unwanted effects on another part.&lt;br /&gt;&lt;br /&gt;Ideally, loosely coupled code allows for separate parts of the application to not have that strong dependency on other parts. This has a number of benefits, such as keeping bugs isolated to one area of the code (instead of having cascading effects throughout the code) and it makes it easier to re-use portions of the code.&lt;br /&gt;&lt;br /&gt;e.g. when you use "global" within a function, you then closely couple that function to whatever it is that initially defines that variable. If for some reason that other part of the code is changed to rename that variable or do things you didn't anticipate, it might break that function. Likewise, you might not realize that the function is doing things to that variable, causing unforeseen bugs in the application. And of course it becomes difficult to re-use such a function in another context if that same variable name does not exist there and have the same meaning/usage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4303012367042792379-5443573272717578990?l=php-js-help.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/5443573272717578990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-js-help.blogspot.com/2009/03/closely-coupled-code-vs-loosely-coupled.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/5443573272717578990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/5443573272717578990'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/2009/03/closely-coupled-code-vs-loosely-coupled.html' title='Closely coupled code Vs Loosely coupled code'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303012367042792379.post-4756702281158548755</id><published>2009-03-16T12:48:00.008+05:30</published><updated>2009-03-16T13:02:56.874+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='value of select'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt transform'/><title type='text'>&lt;img&gt; tag problem while XSLT transformation</title><content type='html'>Problem: When i use &amp;lt; img src=""  /&amp;gt; tag in XSLT i face problem while transforming, normally i get Blank page or some unkown error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Normally when you use &amp;lt;img&amp;gt; tag, there may be various reason. Like When image tag is written you must use &lt;span style="font-weight: bold;"&gt;/&lt;/span&gt; at the end  &amp;lt;&lt;span style="font-style: italic;"&gt;img src="" &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;/&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;Also when you want to use some value select into the tag you get white space. Normally you might be doing something like this.&lt;br /&gt;&amp;lt;&lt;span style="font-style: italic;"&gt;img src="&lt;/span&gt;&amp;lt;&lt;span style="font-style: italic;"&gt;xsl:value-of select="node1/node2" /&lt;/span&gt;&amp;gt;&lt;span style="font-style: italic;"&gt;" /&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;Actually what you have to write is   &amp;lt;&lt;span style="font-style: italic;"&gt;img src="{node1/node2}" /&lt;/span&gt;&amp;gt;&lt;br /&gt;Just remove all that select and just curly braces at start and end. There  may be certain times that you may have to write &amp;lt;&lt;span style="font-style: italic;"&gt;img src="{node1/@node2}" /&lt;/span&gt;&amp;gt;&lt;span style="font-style: italic;"&gt;  i.e. &lt;/span&gt;I mean you have to use @&lt;br /&gt;at the last note.&lt;br /&gt;&lt;br /&gt;Using value-of select is not allowed in any tag. the above given procedure is the solution to it.&lt;br /&gt;&lt;br /&gt;If you still face the problem you reply to same post. I would edit the post and more solutions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4303012367042792379-4756702281158548755?l=php-js-help.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/4756702281158548755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-js-help.blogspot.com/2009/03/tag-problem-while-xslt-transformation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/4756702281158548755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/4756702281158548755'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/2009/03/tag-problem-while-xslt-transformation.html' title='&amp;lt;img&gt; tag problem while XSLT transformation'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303012367042792379.post-6676576956476946164</id><published>2009-03-13T10:20:00.024+05:30</published><updated>2009-03-13T11:18:48.840+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='select box'/><category scheme='http://www.blogger.com/atom/ns#' term='option'/><title type='text'>Javascript : Add / Remove &lt;option&gt; to / from &lt;select&gt;</title><content type='html'>How to add or remove &amp;lt;option&amp;gt; to or from&amp;lt;/select&amp;gt;&lt;br /&gt;&lt;br /&gt;The technique used for this works for DOM complaint browsers. i.e. works in IE 6.0+, Firefox 1.0+, Safari 3 and Opera.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First step is lets write code for SELECT box.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&amp;lt;select id="selbox" name="selbox"&amp;gt;&lt;br /&gt;  &amp;lt;option value="1"&amp;gt;Text 1&amp;lt;/option&amp;gt;&lt;br /&gt;  &amp;lt;option value="2"&amp;gt;Text 2&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Next step is to write javascript for adding.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;function addoption(){&lt;br /&gt;  var op = document.createElement('option');&lt;br /&gt;  var elSel = document.getElementById('selbox');&lt;br /&gt;&lt;br /&gt;  op.text = "Sample Text";   //write text for option.&lt;br /&gt;  op.value = "val";   //write value for option.&lt;br /&gt;&lt;br /&gt;  try{&lt;br /&gt;    elSel.add(op,null);    //in IE  won't work.&lt;br /&gt;  }&lt;br /&gt;  catch (er){&lt;br /&gt;    elSel.add(op);   //for IE.&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Thirs step is to write javascript for removing option which is selected.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;function removeoption(){&lt;br /&gt;  var elSel = document.getElementById('selbox');&lt;br /&gt;&lt;br /&gt;  var i;&lt;br /&gt;  for (i = elSel.length - 1; i&gt;=0; i--) {&lt;br /&gt;    if (elSel.options[i].selected) {&lt;br /&gt;      elSel.remove(i);&lt;br /&gt;  }&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This was the complete sample code which will help you out to get learn. I have code which is more generic which i will write below :&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Javascript Add / Remove options from select.&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;  &amp;lt;!--&lt;br /&gt;  var _doc = document;&lt;br /&gt;&lt;br /&gt;  var uloki = {&lt;br /&gt;    addoption:   function(txtb,selb){&lt;br /&gt;      var em=_doc.getElementById(txtb).value;&lt;br /&gt;      var elSel=_doc.getElementById(selb);&lt;br /&gt;      var te= _doc.createElement('option');&lt;br /&gt;      te.text = em; te.value = em;&lt;br /&gt;      if(em != "" ){&lt;br /&gt;       try{&lt;br /&gt;                                     elSel.add(te,null);    //in IE it wwont work        &lt;br /&gt;       }&lt;br /&gt;       catch (er){&lt;br /&gt;        elSel.add(te);   //for IE&lt;br /&gt;       }&lt;br /&gt;       _doc.getElementById(txtb).value="";&lt;br /&gt;      }&lt;br /&gt;    },&lt;br /&gt;    removeoption: function(selb){&lt;br /&gt;     var elSel = _doc.getElementById(selb);&lt;br /&gt;     var i;&lt;br /&gt;     for (i = elSel.length - 1; i&gt;=0; i--) {&lt;br /&gt;      if (elSel.options[i].selected) {&lt;br /&gt;       elSel.remove(i);&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;  };&lt;br /&gt;  //--&amp;gt;&lt;br /&gt;  &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="text" name="tbox" id="tbox"&amp;gt;&lt;br /&gt;&amp;lt;input type="button" value=" Add " onclick="uloki.addoption('tbox','selb')"&amp;gt;&lt;br /&gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;select name="selb" id="selb" size="4"&amp;gt;&lt;br /&gt;  &amp;lt;option value="dt"&amp;gt;Default Text&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt; &amp;lt;input type="button" value="Remove Selected" onclick="uloki.removeoption('selb')"&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think you have gone through the example explained and also sample i made. Well remember size of select box should be always more than 2. if you remove size or keep it below 2 then it wont function properly.&lt;br /&gt;&lt;br /&gt;So this was how it works : Javascript Add / Remove &amp;lt;option&amp;gt; tag  from / to &amp;lt;select&amp;gt; tag.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks &amp;amp; Put comments if you found bugs / or even if  it helped you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4303012367042792379-6676576956476946164?l=php-js-help.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/6676576956476946164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-js-help.blogspot.com/2009/03/javascript-add-remove-to-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/6676576956476946164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/6676576956476946164'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/2009/03/javascript-add-remove-to-from.html' title='Javascript : Add / Remove &amp;lt;option&amp;gt; to / from &amp;lt;select&amp;gt;'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303012367042792379.post-8456853809256920187</id><published>2009-03-13T10:01:00.000+05:30</published><updated>2009-03-13T10:08:53.360+05:30</updated><title type='text'>Lets start out...</title><content type='html'>Hi,&lt;br /&gt;&amp;nbsp;&amp;nbsp;Myself, Umakant Patil. I have been working in Javascript and PHP since 3 years. From the day i started i faced lots of problems. Always used to seek /search answers over internet. But it was really a difficult job to go and find from variuos site.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Overall i will love to post the question / problems over here with answers for my readers. A complete set problems and solutions for both Javascript and PHP, which may help you while writing code. Remember i wil not teach PHP or Javascript. Its just part of help for PHP and Javascript.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;If you have or face any problem then you may email me at &lt;span style="font-weight:bold;"&gt;umakantpatil4[at]gmail[dot]com&lt;/span&gt;, or reply here the problem. I will try out my bets and answer the question on same blog as soon as possible for you. Hope you love work which i post here.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Remember that if my blog helped you in solving problem do reply here so i can know that my blog is really helping you out so i can post more as i can.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4303012367042792379-8456853809256920187?l=php-js-help.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-js-help.blogspot.com/feeds/8456853809256920187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-js-help.blogspot.com/2009/03/lets-start-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/8456853809256920187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303012367042792379/posts/default/8456853809256920187'/><link rel='alternate' type='text/html' href='http://php-js-help.blogspot.com/2009/03/lets-start-out.html' title='Lets start out...'/><author><name>Umakant Patil</name><uri>http://www.blogger.com/profile/16119573425836684066</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
