글
jQuery 파일 include 시 주의 사항
요즘 웹개발 하시는 분 대부분이 jQuery를 많이 사용하고 계실겁니다.
저두 그렇구요^^
오늘 이 녀석 때문에 3시간 동안 삽질의 삽질을 했네요.
바로 문제의 부분은
<script href="common/jquery.1.4.1.min.js" type="text/javascript" />
뭐가 문제 일까요??
전 이렇게 선언을 하고 그 밑에
<script type="text/javascript">
function methodCall()
{
alert("test");
}
</script>
스크립트 호출문을 추가를 했지만
해당 페이지를 실행 시키면 methodCall()이란 함수가 정의가 되지 않았다는 스크립트
오류만 뱉어내더군요. 므냐~!!
그렇게 스크립트 디버깅을 IE, FF 왔다갔다하면서 해봤지만 해결을 못했죠
결국 구글링~~~~~~~~~~~~~
앗!!! 충격적인 한마디
script tags can't be self-closing. You need a closing
script tag:What the.......!!!!!
이것은
<script href="common/jquery.1.4.1.min.js" type="text/javascript"></script>
이렇게 해야지만 된다는거.... O.O
여태까지 난 jquery를 어떻게 쓰고 있었던거지..
아무튼 이 하나의 정보를 얻기 위해 근무시간 3시간을 날렸다 ㅡ _ㅡ 오호호호
야근 +3 추가요~!!!!!
글
웹서버의 ASP.NET 버전을 Restart없이 변경하는 방법
Restart없이 IIS 재설정 하는 방법입니다.
ASP.NET Ver. 2.0에서 4.0으로 변경하기 위해서는
Command 창에서 닷넷 4.0이 설치가 되어있는 경로로 이동을 합니다.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319/
우선 웹 서버의 Meta ID를 이용해서 변경이 가능합니다. Meta ID를 확인하기 위해서는 아래와 같은 명령어로
등록된 웹서버의 Meta ID를 확인 할 수 있습니다.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –lk
그러면 웹서버의 재 시작 없이 ASP.NET의 버전을 변경하기 위해서는 아래의 명령을 실행시키시면 됩니다.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -s w3svc/250310143/root -norestart
그러면 웹서버의 닷넷 버전이 4.0으로 변경되었음을 확인하실 수 있습니다.
참조 사이트 : http://www.mywindowsclub.com/resources/4487-How-change-NET-Framework-version-IIS.aspx
글
Currency abbreviation (EUR, USD, GBP) convert to currency symbol (€, $, £)
string currency = "USD"
RegionInfo regionInfo = (from culture in CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures)
where culture.Name.Length > 0
let region = new RegionInfo(culture.LCID)
where String.Equals(region.ISOCurrencySymbol, currency, StringComparison.InvariantCultureIgnoreCase)
string currencySymbol = regionInfo.CurrencySymbol;
if currency = "USD" Then currencySymbol = "$"
if currency = "KRW" Then currencySymbol = "₩"
.......
화폐 약자를 입력하면 해당하는 화폐 심볼 기호를 얻게 되는 코드이다.
꽤 괜찮은 코드인듯.^^/
글
Variable Variables in Javascript
자바스크립트에서 변수명을 일정하게 생성하기 위해서 eval을 열심히 사용했지만 선언되지 않은 변수라고 에러가 팍팍팍팍!!!
결국 구글링신의 힘을 빌려 알아낸 결과. window[] 라는 것을 알게 되었다.
역시 구글!!!!
Today I was looking for a decent way to have variable variables in Javascript. Because I work with a whole bunch of particularly bright people*, the answer to any question is always near. I figured I'd share today's little insight! First let's look about how we'd do this in PHP:
Suppose you have a variable named $i containing a numeric value. In this example it's 1 but it could be anything. You want to create a new variable named name1. In PHP you'd use the double $ way:
$i=1;${'name'.$i} = 'Marco';echo "got ".$name1;
When doing the same thing in Javascript, the dreaded eval() comes to mind:
var i=1;eval('name' + i + ' = "Marco"');document.write('got ' + name1);
Nasty. We don't want to use eval() if we can avoid it. And most of the time we actually can! Here's a much more proper way of doing it, using the fact that all global variables are held in the window array.
var i=1;window['name' + i] = 'Marco';document.write('got ' + name1);
There we go! Nice, clean and no eval() necessary.
* It's absolutely delightful to work with people who all excel in what they do without the often associated 'arrogant prick attitude'. I love my job! =)
출처 : http://www.i-marco.nl/weblog/archive/2007/06/14/variable_variables_in_javascri
글
Convert an array to a comma-delimited string
스트링 배열의 값을 Split으로 분리하고 이것을 다시 다른 구문자로
통합시키기 위해서 아래와 같은 코드를 사용하면 된다.
string.join(구분자, Array)
C# 코드
string str = "test1/test2/test3"; string[] arr = str.Split('/'); string join = string.Join(",", arr); Response.Write(join); |
결과 화면
=> test1,test2,test3
글
Create website without table code
Table없이 Div많으로 사이트 레이아웃을 설정하는 방법을 잘 정리된 Codeproject 사이트 페이지입니다.
http://www.codeproject.com/KB/HTML/webpage_layout_no_tables.aspx
글
ASP.NET Chart Control 예제 샘플 파일
VS2008, VS2010에서 사용이 가능하며, 사이트로 예제가 구성되어 있다.
차트 종류 및 설정 등에 대한 설명이 잘되어 있으며, 특히 예제 소스가 있어서
개발하는데 많은 도움이 될 듯하다.^^/
WebSamples.zip