Right now I'm working on PHP. I am using the Doctrine ORM and the jQuery JavaScript library. In my second project I used the Zend Framework. What are the various things I should learn to make a better site?
What are the various things to keep in mind or what are the various new things I should learn? Right now being I fresher we keep i...
Using JQuery, I can do the following to get the text within my LI
$("#listingTabs li").eq(2).text();
How do I set the text? Because the following doesn't work
$("#listingTabs li").eq(2).text() = 'insert new text';
...
I am new to rails so excuse the simple questions. I am creating a website for a company. That company wants to display it's clients on the site. I would like to allow the client to manage this themselves.
I am generating a table for the 'clients' and the three columns I would like to have are: Company Name, Company Description and logo...
I am new to rails so sorry for stupid questions. I have created section of the website I am working on where the client can post news about their clients. In the entry view I collect title:string content:text and link:string. How do I render the link:string as an actual link in the show and index views.
...
I am new to rails so go easy. I have two tables that I am trying to work with here, 'post' and 'category'.
The 'post' table includes the following columns, title:string content:text category:string.
The 'category' table simply contains name:string.
The idea is that the client can manage the categories and also when adding a new post,...
I am trying to detect when the user has left the tinyMCE editor window but I am unable to do so. Here is the code that i think should work (but isnt):
$('.mceEditor').blur(function(){
// I would expect this to fire when the user leaves the
// tinyMCE editor, but it never seems to fire
});
I've also tried:
$('*')
.not('.mc...
I have successfully followed Ryan Bates tutorial of paperclip and have it working correctly. The image attaches to the record and displays on the show.html.erb.I am wondering how to display it on the index pages. Below is what I have tried but not working. For reference, the table is 'review' and the photo is 'photo'.
<table>
<tr>
...
Does anyone know of a JavaScript minifer that can detect unused code and strip it out.
Google Closure seems alright but it appears to only compact.
I'm looking for something much more advanced, where it can look through my JavaScript and not only compact but also remove unused code.
Anyone know of such a tool?
The use base being, I u...
Hello,
Is there any particular difference between intval and (int)?
Example:
$product_id = intval($_GET['pid']);
$product_id = (int) $_GET['pid'];
Is there any particular difference between above two lines of code?
...
Hello There,
I generate a div for my javascript automated validation script. It is generated with below code:
var alertbox = document.createElement("div");
Now how do i center that div programatically both horizontally and vertically?
Note: Currently I am showing an alert box but once i know how to center a div, i will
replace the a...
Hi,
Is it possible to apply MVC pattern to javascript?
...
Hello There,
What tricky questions can you suggest to ask an interviewee about PHP?
I suspect there can be much to be asked from micro-optimization tips and
probably questions related to dealing with deep nested arrays.
Let's suppose, we are looking for a good php developer. What can be the
trickiest questions to ask him?
Thanks for ...
Hello There,
What can be the common PHP coding pitfalls which probably many of us are not avoiding?
...
Hello,
What exactly is late-static binding in PHP?
...
Hello There,
I have been using the cool reflection class in my framework. I wonder whether or not ReflectionClass is future-compatible? For example, in PHP5.3 or PHP6.
Thanks
...
Hello all,
What exactly is the difference between an interface and abstract class?
...
A link which is opening in a new window What is more appropirate to put in Title="text here".
Title="Opens in new window"
or
Title="Opens in a new window"
or
Title="Link opens in new window"
or
Title="Link will open in new window"
or
Title="New window will open" (used by linkedin.com)
Which is grammatically and Logically correc...
Is it possible to prevent IE (7 or 8) to change the underlying code of a page ?
My page, built with Dreamweaver, consists of a table with 5 images; each of these is a link to a larger size one. In FF or Chrome, the page displays exactly as planned. In IE, only the first image displays. All other have the "broken img" icon. The code reve...
Hello All,
I saw Kohana framework allowing users to optionally use HTMLPurifier against any possible XSS attacks.
I thought HTMLPurifier was meant to allow standard-compliant output of the HTML.
Does it help avoid XSS attacks 100% or probably to great extent? Or you would suggest something else.
Thanks
...
I have custom JSP tags that generate some HTML content, along with some javascript functions that get called by this HTML code. In the current implementation, the SCRIPT tags are created just above the HTML code.
To avoid modifying the existing code base, I want to pull up these scripts inside the HEAD section of the page using SiteMes...