Tuesday, July 16, 2013

Edit CakePhp .ctp file in Dreamweaver

Dreamweaver does not understand what the .ctp file extension is, and how should it syntax highlight the code.  So we help Dreamweaver out by editing a few of its configuration files. Below is step by step guide :
1.      “Edit dreamweaver configuration file located at C:\Program Files\Macromedia\Dreamweaver 8\Configuration\Extensions.txt “and alter 2 lines by adding the CTP file extension as follows:
VTML,INC,JAVA,EDML,WML,CTP:All Documents
All document file line should look as above at the end.

PHP,PHP3,PHP4,PHP5,TPL,CTP:PHP Files
The PHP Files line, which was line 16 for me, should look as above.

2.      No we do same as above in configuration file located at
IN Windows xp:
C:\Documents and Settings\{user}\Application Data\Adobe\Dreamweaver 9\Configuration\Extensions.txt
In Windows 7:
“C:\Users\\AppData\Roaming\Adobe\Dreamweaver 9\Configuration\Extensions.txt
3.      Edit another configuration file located at “C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\DocumentTypes\MMDocumentTypes.xml”. What we are looking for is around the 75th line where it reads “servermodel=PHP MySQL”.
winfileextension="php,php3,php4,php5,ctp"
macfileextension="php,php3,php4,php5.ctp"
Add the ctp extension to the comma separated list as shown above.

Thursday, June 27, 2013

Java script to get value from table cell


<script type="text/javascript"  language="javascript">
function getTablecellValue()
{
var table = document.getElementById("myTableD");
alert(table.rows[1].cells[0].innerText);
}
</script>

Friday, April 19, 2013

Cannot send session cookie - headers already sent warning message in php

If you are getting warning in php file that "Cannot send session cookie - headers already sent".
For solution you should insure that nothing is being sent to the page before the session_start().

Make sure its a plain ANSI file, not utf-8 or anything.
if it is not ANSI file then open notepad, insert the php code, and save it as plain ANSI. It should work fine.

Monday, December 5, 2011

Failed to access IIS metabase

if you try to run .aspx file in IIS server and got error like "Failed to access IIS metabase"




The easy solution for this error is:
Open visual studio command prompt and type this command
aspnet_regiis -ga \username
                   Here username is usually aspnet
if this doesn't work than use this command
aspnet_regiis -i

alternatively you can copy and paste this command into windows command prompt

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

this will fix your problem

Saturday, November 5, 2011

Not Possible to create a folder name "CON"

An Indian found that nobody can create a FOLDER anywhere on
the Computer which can be named as "CON". This is
something funny and inexplicable? At Microsoft the whole
Team, couldn't answer why this happened!
TRY IT NOW, IT WILL NOT CREATE A "CON"
FOLDER

Friday, November 4, 2011

Create folder without name in windows

1. Right Click.
2. Choose New Folder.
3. Hold 'alt' Key and Type 255
OR
Rename a folder by Holding 'alt' Key and type 255.

Friday, September 2, 2011

Javascript to show message below the textbox


Demo:


Name




Source Code:
<html>
<head>
<Title>Javascript to show error message by text in a webpage</title>
<script type="text/javascript" language="javascript">
function check()
{
var a=document.getElementById('txtname').value;
if(a=="")
{
document.getElementById('divMsg').innerHTML="Name can not be Blank";
document.getElementById('divMsg').style.color="red";
}
else
{
document.getElementById('divMsg').innerHTML="Your Name: Mr. " + a;
document.getElementById('divMsg').style.color="green";
}
}
</script>
</head>
<body>
Name <input type="text" id="txtname">
<div id="divMsg"></div>
<input type="submit" onclick="check()" value="click">
</body>
</html>