Posted
Filed under Htm&Javascript
[원문] : http://ehofldi123.oranc.co.kr/tc/entry/IE6%BF%A1%BC%AD-%BD%BA%C5%A9%B7%D1%BD%C3%BF%A1-%B9%E8%B0%E6%C0%CC-%B9%D0%B7%C1%BC%AD-%C0%DC%BB%F3%C0%CC%B3%AA%BF%C0%B4%C2%C7%F6%BB%F3?category=0

IE6에서 스크롤시에 배경이 밀려서 잔상이나오는현상
body{
background:#fff;url(/html/script/css/webv2/design/layout3_type3/images/sub/sub_bg.jpg) repeat-x;
}

또는

* html{ background:#fff;}
모든 페이지에 적용 해주자

2010/04/17 20:45 2010/04/17 20:45
Posted
Filed under Htm&Javascript

[원문] : http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer.shtml

IE에서 background 에 이미지 부릿 형태로 이미지 적용을 해보면 적용이 되질 않는다.
그래서 해결 할 수 있는 방법은 ; position: relative 포함 해주자 .

IE
has a very freaky bug where it likes to make background images (and sometimes even text - particularly if there are floated elements around) disappear. This often happens when you scroll up and down on a web page and you can usually make the background re-appear by refreshing the page.

Obviously you won't want your site visitors to have to refresh a page to see a background image in full! A freaky solution to this freaky problem is to insert the CSS command, position: relative into the CSS rule containing the background image:

.foo {
background: url(filename.jpg);
position: relative
}

Occasionally this won't work, so another solution is to assign a width or a height to the element with the background image. You may not want to assign a height or width, so a solution is to assign a height of 1% for Internet Explorer. Because IE interprets height as min-height (see point 2 above) this CSS rule won't affect the appearance:

.foo {
background: url(filename.jpg);
height: 1%
}
html>body .foo {
height: auto
}

The height: 1% CSS command is cancelled out by the height: auto CSS command. Internet Explorer doesn't understand html>body, so by inserting this in front of the second CSS rule this whole CSS rule is ignored by IE.

2010/04/16 02:20 2010/04/16 02:20
Posted
Filed under Htm&Javascript

if( navigator.appName.indexOf("Microsoft") > -1 ) // IE?

{

    if( navigator.appVersion.indexOf("MSIE 6") > -1) // IE6?

    {

        // code

   }

    else if( navigator.appVersion.indexOf("MSIE 7") > -1) // IE7?  

    {

        // code

    }

}

2010/04/16 01:41 2010/04/16 01:41
Posted
Filed under Htm&Javascript

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  

<html>  

<head>  

<title> eyes of siche </title>  

</head>  

 

<body>  
<script type="text/javascript">  

<!--  

    function setPng24(obj) {  

       obj.width=obj.height=1;  

       obj.className=obj.className.replace(/\bpng24\b/i,'');  

       obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+obj.src+"',sizingMethod='image');" 
        obj.src='';  
        return '';  

    }  

//-->  

</script>  

<style type="text/css">  

    body { background: yellow; }  

    .png24 { tmp: expression(setPng24(this)); }  

</style>  

<img src="http://eos.pe.kr/ex/png/png.png" class="png24">  

</body>  

</html>

2010/04/16 01:36 2010/04/16 01:36
Posted
Filed under Htm&Javascript
[원문]:http://sulfur.pe.kr/web/javasc/javas004.html

<noscript> 태그는 브라우저에서 <script> 태그가 작동하지 않을 때 대신 내보낼 내용을 담기 위해 쓰인다.

즉, 방문객이 브라우저에서 자바스크립트가 실행되도록 설정해 두었다면 자바스크립트는 실행되고 <noscript> 태그 안의 내용은 나오지 않는다. 하지만 자바스크립트 기능을 꺼두고 있다면 자바스크립트가 실행되지 않는 대신에 <noscript> 태그 안의 내용이 출력된다.


<script type="text/javascript">
document.write('안녕하십니까?')
</script>
<noscript><p>자바스크립트를 꺼두셨군요.</p></noscript>

위의 예에서, 보통은 자바스크립트가 실행되기 때문에 화면에는 다음 문장이 나올 것이다.

안녕하십니까?

하지만 자바스크립트가 실행되지 않는다면 화면에는 다음 문장이 나오게 된다.

자바스크립트를 꺼두셨군요.

브라우저에서 자바스크립트 기능을 꺼두고 쓰는 사람도 있기 때문에 자바스크립트를 쓴 곳에는 <noscript> 태그를 써서 자바스크립트가 필요하다는 걸 알려주는 게 좋다.


<p><a href="#" onclick="window.open('photo.html'; return false">사진 보기</a></p>
<noscript><p>사진 보기를 하려면 자바스크립트가 필요합니다.</p></noscript>

위 예에서는 자바스크립트를 써서 사진 보기 창을 뜨도록 하고 있으므로, 자바스크립트를 꺼두면 새 창을 뜨게 할 수 없기 때문에 사진을 볼 수 없다. 만약 <noscript> 태그를 쓰지 않는다면 모르는 사람은 왜 사진 보기가 안 되는 걸까 의아해 할지도 모른다. 하지만 <noscript> 태그를 써서, 위와 같이 사진을 보기 위해서는 자바스크립트가 필요하다는 걸 알려준다면 자바스크립트 기능을 꺼두었기 때문에 사진 보기가 안 된다는 걸 알고 사진을 보기 위해 자바스크립트 기능을 켜게 될 것이다.

위 코드의 결과는 다음과 같다. 브라우저에서 자바스크립트 기능을 꺼서 어떻게 보이는지 직접 확인해 보기 바란다.

사진 보기

참고로 photo.html 파일은 만들지 않았으므로 사진 보기를 눌러도 새 창은 뜨지 않을 것이며, <noscript> 태그 안의 글씨는 현재 이곳의 CSS 설정에 따라 크기나 색깔이 다르게 보일 수도 있다.

<noscript> 태그 안의 내용은 웹 문서의 내용과는 상관 없는 것이므로 웹 문서의 내용과는 다르게 보이도록 하는 게 좋다. 예를 들어, CSS에서 설정을 다음과 같이 해 두면 <noscript> 태그 안의 글씨는 돋움 글꼴에 본문 글씨보다 작게 녹색으로 보이게 되므로 웹 문서에 쓰인 글씨가 검은 색이면 서로 구별될 것이다.


noscript { font-family: 돋움, Dotum; 
           font-size: 75%; 
           color: green; }

끝으로 한 가지 주의사항은, <noscript> 태그는 <p> 태그를 감쌀 수 있지만 그 반대는 되지 않고, <noscript> 태그 안에 들어 있는 글씨를 <p> 같은 형님 태그로 감싸주지 않으면 웹 표준 검사에서 오류가 난다는 것이다.

2010/04/09 18:58 2010/04/09 18:58
Posted
Filed under Htm&Javascript
[원문]  http://vincenthomedev.wordpress.com/2009/02/10/consuming-an-aspnet-web-service-or-page-method-using-jquery/



The following is a dummy ASP .NET web service. Please note that this service is adorned with the ScriptService attribute that makes it available to JavaScript clients.

Listing 2: A Dummy web service
  1. [WebService(Namespace = "http://tempuri.org/")]  
  2. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
  3. [System.Web.Script.Services.ScriptService]  
  4. public class dummyWebservice : System.Web.Services.WebService  
  5. {  
  6.   [WebMethod()]  
  7. public string HelloToYou(string name)  
  8.   {  
  9. return "Hello " + name;  
  10.   }  
  11.   [WebMethod()]  
  12. public string sayHello()  
  13.   {  
  14. return "hello ";  
  15.   }    

For example, we can call a specific web method in a web service as such.

Listing 4: JQuery .ajax command
  1.   $.ajax({  
  2.   type: "POST",  
  3.   contentType: "application/json; charset=utf-8",  
  4.   url: "WebService.asmx/WebMethodName",  
  5.   data: "{}",  
  6.   dataType: "json"
  7. }); 

Two things are worth noting in the above JQuery AJAX call. First, we must specify the contentType’s value as application/json; charset=utf-8, and the dataType as json; second, to make a GET request, we leave the data value as empty.

So put it together, the following code demonstrates how we would use JQuery to call the web service we created above.

Listing 5: Calling a web service using jQuery
  1. <%@ Page Language="C#" %>
  2. <%@ Import Namespace="System.Web.Services" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html >
  6. <head id="Head1" runat="server">
  7. <title>ASP.NET AJAX Web Services: Web Service Sample Page</title>
  8. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jQuery/1.2.6/jQuery.min.js">
  9. </script>
  10. <script type="text/javascript">
  11.       $(document).ready(function() {  
  12.          $("#sayHelloButton").click(function(event){  
  13.              $.ajax({  
  14.                  type: "POST",  
  15.                  url: "dummyWebsevice.asmx/HelloToYou",  
  16.                  data: "{‘name’: ‘" + $(‘#name’).val() + "’}",  
  17.                  contentType: "application/json; charset=utf-8",  
  18.                  dataType: "json",  
  19.                  success: function(msg) {  
  20.                      AjaxSucceeded(msg);  
  21.                  },  
  22.                  error: AjaxFailed  
  23.              });  
  24.          });  
  25.      });  
  26.           function AjaxSucceeded(result) {  
  27.               alert(result.d);  
  28.           }  
  29.           function AjaxFailed(result) {  
  30.               alert(result.status + ‘ ‘ + result.statusText);  
  31.           }    
  32. </script>
  33. </head>
  34. <body>
  35. <form id="form1" runat="server">
  36. <h1> Calling ASP.NET AJAX Web Services with jQuery </h1>
  37.      Enter your name:   
  38. <input id="name" />
  39. <br />
  40. <input id="sayHelloButton" value="Say Hello"
  41. type="button" />
  42. </form>
  43. </body>
  44. </html>

Calling an ASP .NET page method

Listing 6: A dummy hello world page method

  1. [WebMethod()]  
  2. public static string sayHello()  
  3. {  
  4. return "hello ";  
  5. }   

Please note that page methods must be declared as static, meaning a page method is completely self-contained, and no page controls are accessible through the page method. For example, if you have a textbox on the web form, there is no way the page method can get or set its value. Consequently any changes with regards to the controls have no affect on the page method. It is stateless and it does not carry any of the view-state data typically carries around by an asp .NET page.

We use the same jQuery command $.ajax to call a page method, as shown in the following example.

  1. <script type="text/javascript">  
  2.       $(document).ready(function() {  
  3.           $.ajax({  
  4.               type: "POST",  
  5.               url: "pagemethod.aspx/sayHello",  
  6.               contentType: "application/json; charset=utf-8",  
  7.               data: "{}",  
  8.               dataType: "json",  
  9.               success: AjaxSucceeded,  
  10.               error: AjaxFailed  
  11.           });   
  12.     });  
  13. function AjaxSucceeded(result) {  
  14.           alert(result.d);  
  15.       }  
  16. function AjaxFailed(result) {  
  17.           alert(result.status + ‘ ‘ + result.statusText);  
  18.       }    
  19.   </script>   

For more info please visit Xun Ding’s excellent article Using jQuery with ASP .NET

2010/04/05 18:04 2010/04/05 18:04
Posted
Filed under Htm&Javascript
[출처] http://kb2.adobe.com/cps/127/tn_12701.html
What's covered

This document lists the required and optional attributes of the object and embed tags used to publish Adobe Flash movies.

For specific usage information for these attributes, refer to sections of the Using Flash manual devoted to using object and embed tags (exact headings vary among Flash versions). Information is also available in "Adobe Flash OBJECT and EMBED tag syntax" (TechNote tn_4150).

Required attributes

The following attributes are required within the object and/or embed tags when adding a Flash movie to an HTML page:

Both object and embed:
  • width - Specifies the width of the movie in either pixels or percentage of browser window.
  • height - Specifies the height of the movie in either pixels or percentage of browser window.
object tag only:
  • classid - Identifies the ActiveX control for the browser. (See example code in TechNote tn_4150 for the correct value.)
  • codebase - Identifies the location of the Flash Player ActiveX control so that the browser can automatically download it if it is not already installed. (See example code in TechNote tn_4150 for the correct value.)
  • movie (param) - Specifies the location (URL) of the movie to be loaded.
embed tag only:
  • src - Specifies the location (URL) of the movie to be loaded.
  • pluginspage - Identifies the location of the Flash Player plug-in so that the user can download it if it is not already installed. EMBED only. (See example code in TechNote tn_4150 for the correct value.)
Optional attributes and possible values:

The following attributes are optional when defining the object and/or embed tags. For object , all attributes are defined in param tags unless otherwise specified:

  • id (attribute for object, object only) - Movie Identifier. Identifies the Flash movie to the host environment (a web browser, for example) so that it can be referenced using a scripting language.
  • name (embed only) - Movie name. Identifies the Flash movie to the host environment (a web browser, typically) so that it can be referenced using a scripting language such as JavaScript or VBScript.
  • swliveconnect - Possible values: true, false. Specifies whether the browser should start Java when loading the Flash Player for the first time. The default value is false if this attribute is omitted. If you use JavaScript and Flash on the same page, Java must be running for the FSCommand to work.
  • play - Possible values: true, false. Specifies whether the movie begins playing immediately on loading in the browser. The default value is true if this attribute is omitted.
  • loop - Possible values: true, false. Specifies whether the movie repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted.
  • menu - Possible values: true, false.
    • true displays the full menu, allowing the user a variety of options to enhance or control playback.
    • false displays a menu that contains only the Settings option and the About Flash option.
  • quality - Possible values: low, high, autolow, autohigh, best.
    • low favors playback speed over appearance and never uses anti-aliasing.
    • autolow emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If the Flash Player detects that the processor can handle it, anti-aliasing is turned on.
    • autohigh emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the View > Antialias setting in Flash.
    • medium applies some anti-aliasing and does not smooth bitmaps. It produces a better quality than the Low setting, but lower quality than the High setting.
    • high favors appearance over playback speed and always applies anti-aliasing. If the movie does not contain animation, bitmaps are smoothed; if the movie has animation, bitmaps are not smoothed.
    • best provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.
  • scale - Possible values: showall, noborder, exactfit.
    • default (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.
    • noorder scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie.
    • exactfit makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.
  • align (attribute for Object) - Possible values: l, t, r.
    • Default centers the movie in the browser window and crops edges if the browser window is smaller than the movie.
    • l (left), r (right), and t (top) align the movie along the corresponding edge of the browser window and crop the remaining three sides as needed.
  • salign - Possible values: l, t, r, tl, tr.
    • l, r, and t align the movie along the left, right, or top edge, respectively, of the browser window and crop the remaining three sides as needed.
    • tl and tr align the movie to the top left and top right corner, respectively, of the browser window and crop the bottom and remaining right or left side as needed.
  • wmode - Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.
    • window - movie plays in its own rectangular window on a web page.
    • opaque - the movie hides everything on the page behind it.
    • transparent - the background of the HTML page shows through all transparent portions of the movie, this may slow animation performance.
  • bgcolor - [ hexadecimal RGB value] in the format #RRGGBB . Specifies the background color of the movie. Use this attribute to override the background color setting specified in the Flash file. This attribute does not affect the background color of the HTML page.
  • base - . or [base directory] or [URL]. Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.
  • flashvars - Possible values: variable to pass to Flash Player. Requires Macromedia Flash Player 6 or later.
    • Used to send root level variables to the movie. The format of the string is a set of name=value combinations separated by '&'.
    • Browsers will support string sizes of up to 64KB (65535 bytes) in length.
    • For more information on FlashVars, please refer to "Using FlashVars to pass variables to a SWF" (TechNote tn_16417).

Note: Values in brackets and italics indicate that the developer chooses the value.

Active Content JavaScript

Note: As of April 2008, Microsoft has removed all Active Content requirements from Internet Explorer. The information in this technote is supplied for historical reference to the period from April 2006 to April 2008. For details on Microsoft's deprecation of Active Content, see MSDN. For details of Adobe's Active Content workarounds see the Adobe Active Content Developer Center.

When you publish a Flash document with HTML using the "Flash Only" or "Flash HTTPS" HTML templates in Flash CS3 Professional, a JavaScript file linked to the HTML file, named AC_RunActiveContent.js will automatically be created. This file will need to remain with the HTML file for the JavaScript-based active content embedding. For more information on active content, please visit the Active Content Developer Center.

Note: For Flash 8, the inclusion of JavaScript-based active content embedding is possible through the Flash Active Content Update Extension.

A JavaScript function called AC_FL_RunContent() is used to dynamically generate the necessary object and embed tags necessary for the browser to display your Flash movie. This function is defined within AC_RunActiveContent.js and called in the location of your HTML file where you wish your Flash movie to be displayed. Example:

 <script >
		
if (AC_FL_RunContent == 0)
{
alert("This page requires AC_RunActiveContent.js.");
}
else
{
AC_FL_RunContent(
'codebase',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width',
'550',
'height',
'400',
'src',
'myFlashMovie',
'quality',
'high',
'pluginspage',
'http://www.macromedia.com/go/getflashplayer',
'align',
'middle',
'play',
'true',
'loop',
'true',
'scale',
'showall',
'wmode',
'window',
'devicefont',
'false',
'id',
'ACTest',
'bgcolor',
'#ffffff',
'name',
'myFlashMovie',
'menu',
'true',
'allowScriptAccess',
'sameDomain',
'movie',
'myFlashMovie',
'salign',
'' );
//end AC code
}
</script>
2010/03/03 09:08 2010/03/03 09:08
Posted
Filed under Htm&Javascript
<script language="Javanull">
<!--F5키 금지
doc-ument.on-keydown = function() {
if (event.keyCode == 116) {
event.keyCode = 505;
}
if (event.keyCode == 505) {
return false;
}
}
//스크립트 끝-->
</script>
2010/03/02 21:39 2010/03/02 21:39
Posted
Filed under Htm&Javascript

[원문]http://home.tiscali.nl/developerscorner/fdc-varia/font-embedding.htm


<style type="text/css">
@font-face {
    font-family: "Ace Crikey";
    src: url(ace.ttf);
}
.ace {
    font-family: "Ace Crikey";
    font-size: 230%;
}
</style>

css-validator:

2010/02/24 10:05 2010/02/24 10:05
Posted
Filed under Htm&Javascript
투명한 iframe을 사용 하기 위해서는
<iframe id="ifm" allowtransparency="true" frameborder="no" src="./menu.html" />

아이프레임으로 연결 한 html 페이지 에서  body 에 다음과 같이 설정 한다.
<body style="background-color:transparent">

2010/02/24 09:45 2010/02/24 09:45