다중셀렉트

phpschool 박상국

기존에 올라온 다중 세렉트들이 많기는 하지만 실제 웹페이지에 적용하려면
소스를 수정해야 하는 경우가 많았습니다.
다중 폼이 적용된 페이지 이거나 폼이름이 다른경우, 각 Element의 이름을
달리 하려도 소스수정은 불가피 한거 같더군요..
그래서 이러한 환경에 독립적으로 동작할 수 있게끔 만들어 봤습니다.

특징 :
1. 다중폼, 폼네임을 변경하여도 소스의 수정이 필요없다.
2. Element의 이름 정정이 용이하다.
3. 수정없이 어느 페이지나 바로 사용이 가능하다.

소스 :

사업자번호 체크 (자바스크립트)

/*******************************************************************************
* 사업자번호 검사
******************************************************************************/
function RegiNum2($reginum) {
$weight = ‘137137135’; // 자리수 weight 지정
$len = strlen($reginum);
$sum = 0;

if ($len <> 10) { return false; }

for ($i = 0; $i < 9; $i++) {
$sum = $sum + (substr($reginum,$i,1)*substr($weight,$i,1));
}
$sum = $sum + ((substr($reginum,8,1)*5)/10);
$rst = $sum%10;

if ($rst == 0) {$result = 0;}
else {$result = 10 – $rst;}

$saub = substr($reginum,9,1);

if ($result <> $saub) {return false;}
return true;
}

테이블 태그 없이 css로 작업하기

출처 : PHPSCHOOL
작성자 : 우수한
http://webmasterbase.com/article.php?pid=0&aid=379

postnuke 같은 사이트 빌더를 만들면서,
아무래도 가장 고민이 되는 부분은 화면 레이아웃 문제였습니다.
postnuke 나 My Yahoo 에서 쓰는 방식으로도 만들어보고
이것을 개조해 화면 전체를 블럭으로 만들면서 각각의 옵션을 저장하는 방식으로도 만들어봤습니다만…
사용자의 다양한 요구에 모두 부응하기란… 골치아픈 문제더군요.
(쉽게 말해 postnuke 같은거 쓰면서 헤더,왼쪽,가운데,오른쪽,풋터 이런 식으로 구분하지 않고 제 각기 원하는대로 테이블을 구성하게 한다는 얘깁니다.)

그런데, 아예 TABLE 태그를 사용하지 않으면서,
화면 출력시에 CSS 를 사용해서 table 흉내를 내는 방법이 있습니다.

다음 예제를 보시죠.
테이블 모양으로 꾸며진 페이지: http://sitepoint.com/cssdesign/index.php
페이지 소스 (테이블 태그 없음): http://sitepoint.com/cssdesign/source.html
여기에 사용된 스타일시트 : http://sitepoint.com/cssdesign/styles.html
스타일시트가 없다면 이렇게 출력되겠죠 : http://sitepoint.com/cssdesign/nostyle.php

잘 보시면,

왼쪽칼럼 가운데칼럼 오른쪽칼럼

이렇게 되어있던 것이

왼쪽칼럼

가운데칼럼

오른쪽칼럼

으로 바뀌어있습니다.
그리고 “왼쪽”, “오른쪽” 등의 CSS에 float 와 Absolute Positioning 등을 적용합니다.
웹페이지 마다 길이가 다르기 때문에
footer 의 위치를 잡는게 어려운데, 이건 각 칼럼에

 

를 넣어서 해결합니다.
상세한 그림이 http://webmasterbase.com/article/379/90 에 나와있습니다.

테이블 태그 없이 css로 작업하기 – html소스



SP No Tables

SitePoint is proud to support The WaSP Browser Upgrade initiative.

Our site has been redesigned to take full advantage of Current Web Standards. The browser you are currently using does not meet the WC3 standards of HTML 4.01, CSS-1 or ECMA Script.

Click here to upgrade to a current browser that supports web standards such as the new versions of Netscape, Internet Explorer, and Opera.

If you do not wish to upgrade, please enjoy the SitePoint content without the formatting.

Thanks, The SitePoint Team.

Send Feedback
Print Article
Email Article

Author

Publishing an Ezine

by Merle

Probably the most valuable form of online marketing there is. Ezines can put you in the perfect postion in a one to one marketing environment. The ability to get to know your customers and create online loyalty is a position every business should be striving for.

  1. Establishes Trust: When people visit your website, they have no idea who you are. As far as they’re concerned you might be some evil person lying in wait, just trying to get your hands on their credit card number so you can run up the national debt. The media is partially to blame for this unfounded fear, but you need to be aware it exists and get those visitors to trust you in order to turn them into paying customers. Publishing an ezine helps to establish you as a reputable business dealer and over time, inspires trust.

  2. Brings Visitors Back: Statistics show a customer needs to see your advertising message six or seven times before making a purchase. But how do you get a casual browser to come back? When someone signs up for your ezine, the mailing itself will serve as a reminder to revisit again and again, eventually turning your subscribers into paying customers.

  3. Establishes You as an Expert and Builds Brand Loyalty: Just because you’re in business on the web, does that really mean you know what you’re talking about? By publishing a newsletter and writing your own articles, subscribers will come to see you as an expert in your field. This and the familiarity they feel from reading your newsletter will reinforce brand loyalty to your site, turning many of your current subscribers into future customers.

  4. Keeps Current & Potential Customers Up to Date on New Products & Services: We all add on to our current list of products and services on a regular basis. Pricing may change, we may add new sections of interest to our websites, etc. Your publications allow you to share this important information with current and potential customers keeping them up to date and possibly bringing them back for a new sale. Nothing is worse than having a client tell you he went to one of your competitors because he didn’t know you offered that same service or product.

  5. Builds Relationships: Let’s face it — Building a relationship takes time. Ezine publishing is one avenue towards doing so. I can’t tell you how often I get an email from someone who feels she knows me after subscribing to my ezine for the past year or so. Relationship marketing is important on the Web and publishing your own newsletter will help you do just that. The truth is, we’d rather spend our money with someone we like than someone we don’t know.

  6. Allows You to Build an Opt-In Email Marketing List: Repeat after me: Spam is bad, opt-in is good. You can’t buy a list of names and start blasting out your marketing message to people you don’t know without getting yourself into a lot of trouble. But if those people have opted in to your ezine they have given you “permission” to send them email. They’re an attentive audience who has already said they want to hear from you on a regular basis. You never want to abuse this right, but if you send out helpful information you’ll be able to plug your company in between the lines without making anyone angry.

  7. Keeps Your Website Fresh in Visitors’ Minds: Have you ever gone to a website and really liked it, only to forget about it later? Sure, you may have bookmarked the site, but maybe you haven’t gone through your bookmarks in a long time. I love when I get an ezine from one of my favorite sites, which serves as a trigger to “pop in” for a re-visit. This technique of “reminding” someone about your site is important; it really helps to keep a constant flow of traffic returning to your website.

Ezine publishing is one of the most effective marketing tools online today. Not only is it powerful it’s probably one of the most cost-effective tools you can use in promoting your website. If you haven’t tried it, it’s never too late to start. Publishing your own newsletter can be one of the most rewarding tasks you perform….not just financially, but also personally. You’ll get a warm and fuzzy feeling from all of the people you’ll be helping…..and that, my friend, is a reward in itself.

Send Feedback
Print Article
Email Article


Written by Merle. www.ezineadauction.com “Where the Best Deals in Ezine Advertising are Made” Subscribe to Ezine Ad Auction Authority and be kept up to date on new auctions as they’re added and much more.

Rate this article:
Poor










Excellent

What others say: No votes yet. Be the first!

Related Articles

Related Forum

As seen in: The Standard, eCompany Now, ZDTV, Lockergnome, PC Pro (UK), IT Graphics (Australia).

Subscribe To our Newsletters


The Tribune

The Tech Times


More Info

The SitePoint Network




테이블 태그 없이 css로 작업하기 – 스타일시트

body {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
font-family: verdana, arial, helvetica, sans-serif;
color: black;
background-color: #B0C0D0;
}

p {
font: 12px /1.5 Verdana, Arial, Helvetica, sans-serif;
color:#000;
}

li {
font:12px /1.5 Verdana, Arial, Helvetica, sans-serif;
color:#000;
}

h1 {
font: bold 20px /30px Trebuchet MS, Arial, Verdana, Helvetica, sans-serif;
color:#358;
padding: 0px;
margin: 0px;
}

h2 {
font: bold 14px Verdana, Arial, Helvetica, sans-serif;
color:#000000;
}

img {
border: 0;
}

form {
margin: 0px;
padding: 0px;
}

#top {
margin: 0px 20px 0px 20px;
padding: 0px 8px 0px 0px;
border: 0px;
height: 80px;
background: #B0C0D0 url(/cssdesign/tail1.gif) repeat-x right bottom;
}

#crumbtrail {
position: absolute;
z-index: 20;
top: 85px;
left: 170px;
}

#search {
margin: 0px 20px 0px 159px;
padding: 0px 10px 2px 10px;
background: #CAD5DF;
}

#middle {
margin: 0px 20px 0px 159px;
padding: 4px 4% 2px 4%;
border: 0px;
background: #fff;
}

#left {
position: absolute;
width: 138px;
top: 80px;
left: 21px;
margin: 0px 0px 0px 0px;
padding: 108px 0px 0px 0px;
border: 0px ;
background: #B0C0D0;
}

#sub {
position: absolute;
z-index: 5;
width: 147px;
height: 113px;
top: 75px;
left: 12px;
background: url(/cssdesign/bgsubscribe.gif) no-repeat;
padding: 15px 0px 0px 25px;
}

#banner {
text-align: center;
}

#privacy {
background: #6691BC;
margin: 0px 20px 0px 159px;
padding: 5px 4% 5px 4%;
}

#copyright {
position: relative;
background: #445566 url(http://www.sitepoint.com/graphics/v2/layout/footer_btmright.gif) no-repeat bottom right;
margin: 0px 20px 20px 159px;
padding: 5px 0px 5px 0px;
}

#leftcurve {
position: relative;
top: -33px;
width:172px;
background: url(http://www.sitepoint.com/graphics/v2/layout/footer_btmleft.gif) no-repeat top right;
}

.message {
display: none;
}

.header {
width: 100%;
background: url(/cssdesign/tail_tile1.gif) repeat-x ;
}

.ads {
width: 100%;
background: #B0C0D0 ;
}

.top {
color: #808080;
font: 10px /20px verdana, arial, helvetica, sans-serif;
text-align: right;
margin-top: 0px;
margin-bottom: 0px;
}

.left {
color: #808080;
font: 10px /19px verdana, arial, helvetica, sans-serif;
margin-bottom: 20px;
}

.sub {
font: 10px verdana, arial, helvetica, sans-serif;
}

.search {
font: 12px verdana, arial, helvetica, sans-serif;
text-align: right;
}

.mininav {
width: 100%;
text-align: right;
font: 7px /2 Arial;
color: #b0b0b0;
}

.ratearticle {
background: #eee ;
text-align: center;
padding: 0px;
}

.smauthorname {
text-decoration:none;
font-size: 8pt;
color:#335588; ; font-family: Arial, Helvetica, sans-serif}

.privacy {
font: 10px Arial, Helvetica;
color: #CCC;
text-align: right;
text-decoration: none;
margin: 0;
padding: 0;
}

a:hover.privacy {
text-decoration: none;
color: #fff;
}

.copyright {
font: 9px /1.2 Arial, Helvetica;
color: #CCC;
text-align: center;
margin: 0px;
padding:0px;
}

.navside {
background: #6691BC;
width: 138px;
height: 24px;
text-indent: 10px;
padding: 0px;
margin: 0px;
}

.curly {
background: #6691BC url(http://www.sitepoint.com/graphics/v2/layout/menu_btmcorner.gif) bottom left no-repeat;
width: 138px;
height: 14px;
margin: 0px;
}

.navsidelink {
text-decoration: none;
font: bold 12px /2 Verdana, Arial, Helvetica, sans-serif ;
color:#FFFFFF;
padding: 0px;
margin: 0px;
}

.navsidenotes {
font: 10px Verdana,Arial,Helvetica,Sans;
color: #17324E;
padding: 10px 10px;
background: #769DC5;
margin: 0px;
}

A:hover.navsidelink {
text-decoration:none;
color:#DDDDDD;
}

.navbody {
color:#335588;
}

A:hover.navbody {
color:#666666;
}

.standard {
font: 10px /13px Verdana, Arial, Helvetica, sans-serif;
color:#000000;
}

.articleTitleLink {
font: bold 12px Verdana, Arial, Helvetica, sans-serif;
color:#0022AA;
text-decoration: underline
}

A:hover.articleTitleLink {
color:#3a77EE
}

.smlink {
font: bold 9px Verdana, Arial, Helvetica, sans-serif;
color:#666666;
}

A:hover.smlink {
color:#3a77EE;
}

.global2 {
font: 9px Arial, Helvetica, sans-serif;
text-decoration:none;
color:#b0b0b0;
}

A:hover.global2 {
text-decoration:underline;
color:#e0e0e0
}

.asseen {
font: 9px /13px Verdana, Arial, Helvetica, sans-serif;
color:#666666;
text-align: center;
margin: 0px;
}