´ç½Å¿¡°Ô·Î ¶°³ª´Â ²Þ¼Ó¿©Çà - ²Þ¼Ó³ª¶ó(http://www.inyourdream.net) ÀÔ±¹Çϱâ | ¿µÁÖ±Ç ½Åû
  • ¸öºÎ¸² °ñ¶ó°ñ¶ó
  • ¼Ò±Ù¼Ò±Ù
  • µµ¶õµµ¶õ
  • ³«¼­¸¶´ç
  • Âø°¢ÇѾÆÀÌ
  • ¼ýÀÚ¸ÂÃß±â
  • ¼Ò¿øºô±â
  • ÈçÀû³²±â±â
  • ²Þ¼Ó¿©Çà
  • Ä£±¸Áý ³î·¯°¡±â
  • ¸ðµÎµå¸²´ÔÀÇ È¨
  • î¤éÞ´ÔÀÇ È¨
  • Çö¿ì´ÔÀÇ È¨
  • º°¾ÆÇØ´ÔÀÇ È¨
  • ÇÞ»ì´ÔÀÇ È¨
  • À̳ª´Ï´ÔÀÇ È¨
  • À¯¸®¾Ë´ÔÀÇ È¨
  • ³È³ÈÀÌ´ÔÀÇ È¨
  • ²ÀÁö´ÔÀÇ È¨
  • ´ë¼º´ÔÀÇ È¨
  • ²ÀÁö / 2002-02-01 / ¿ÀÀü 10:54:54 / 211.181.157.50
    Á¶È¸¼ö : 129
    [Áú¹®] Á» º¸¾Æ ÁÖ¼¼¿ä......
    > Á¤¼ö´Ô / 俵´Ô / ä³Î´Ô/ Á» ºÁÁÖ¼¼¿ä...
    >
    > [a.asp]
    > ================ÀÚ¹Ù½ºÅ©¸³Æ® ºÎºÐ======================
    >
    > function choicelocation()
    > {
    > url = document.f.area.value = '';
    > location.href = "answer.asp";
    > =========================================================
    >
    >
    > <select name="area" tabindex="3" onchange="choicelocation()">
    > <option value="" selected>Áö¿ª¸íÀ» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ.</option>
    > <option value="1">¼­¿ïƯº°½Ã</option>
    > <option value="2">ºÎ»ê±¤¿ª½Ã</option>
    > ........................(»ý·«)
    > <select name="tommy" tabindex="4" onchange="changeapt()">
    > <option value="" selected>¾ÆÆÄÆ®¸íÀ» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ</option>
    > <option value="1">°¥¿ùµ¿ ¾ÆÆÄÆ®</option>
    >
    >
    > .....ÀÌ·¸°Ô ¸¸µé¾î¼­ ÀÌ ¼­¿ïƯº°½Ã¸¦ Ŭ¸¯ÇÏ¸é ´ÙÀ½¿¡´Â ¼­¿ï¿¡
    > ÇØ´çÇÏ´Â °¥¿ùµ¿ ¾ÆÆÄÆ®µîÀÌ Ãâ·ÂµÇ°Ô ÇÒ·Á°í ÇÕ´Ï´Ù.
    >
    > ±×·±µ¥ SP(Stored Procedure)¸¦ »ç¿ëÇÏ¿©¼­ ÇÏ¿©¾ß Çϰŵç¿ä.
    >
    > SELECT°¡ 1~5±îÁö°¡ ÀÖ½À´Ï´Ù.
    > ÀÌ ºÎºÐ ÀÌ¿ëÇÏ°í OnchangeÀ̺¥Æ®¿¡ Á¢¸ñÀ» ½Ãų·Á¸é
    > ¾î¶»°Ô Çϳª¿ä....(B.ASP¿¡ Ãâ·Â)
    >
    > SELECT_5: -- ȨÆäÀÌÁö Áö¿ª¿¡ µû¸¥ ÇöÀå¸í Á¶È¸
    > SELECT B.DPTDES
    > FROM BCASITA0 A,
    > AACODEDB..AAASITA0 B
    > WHERE A.CDSITE LIKE 'K' + @SIDO + '%'
    > AND A.CDCOM = 'C'
    > AND A.ACTIVE = 'A'
    > AND B.CDDPT = A.CDSITE
    > AND B.CDCOM = A.CDCOM
    > ORDER BY B.DPTDES
    >
    > RETURN
    > GO
    >
    > ºü¸¥ ´äº¯ Á» ºÎŹÇÕ´Ï´Ù.
    >
    >
    -----------------------------------------------------------



    1. ÀÚ¹Ù½ºÅ©¸³Æ®·Î ¸®½ºÆ® ¹Ú½ºÀÇ ¼±Å𪠳ѱâ´Â ºÎºÐ
    (Æû À̸§: MyForm À̶ó°í °¡Á¤)

    function choicelocation(){
    url = MyForm.area.value;
    location.href = "answer.asp?area="+url;
    }

    2. µ¿ÀûÀ¸·Î Áö¿ª Á¤º¸ ¹Ù²Ù±â
    1¹øÀÇ ·ÎÁ÷°ú´Â º°°³·Î óÀ½ Áö¿ªÁ¤º¸¸¦ DB·Î °¡Á®¿Ã¶§ ¸ðµç °ª(Áö¿ª¸í, ¾ÆÆÄÆ®¸í)À» °¡Á®¿ÂÈÄ ÀÚ¹Ù½ºÅ©¸³Æ® »ó¿¡¼­ ¹è¿­¿¡ ´ãµçÁö,
    ¾Æ´Ï¸é DHTMLÀÇ ½ºÅ¸ÀÏ ¼Ó¼ºÀ» ÀÌ¿ëÇÏ¿© ÇØ´ç Á¤º¸¸¦ ÆäÀÌÁö »ó¿¡ º¸ÀÌÁö ¾Ê°Ô ³ªÅ¸³½´Ù.
    <select name="AreaSel" style="visibility:hidden;">
    ÀÌ·± ½ÄÀ¸·Î ÇÏ¿© choicelocation()ÀÇ ÇÔ¼öºÎºÐ¿¡¼­ ±¸ÇöÇÏ¿© Áö¿ª¸íÀÌ ¹Ù²ð¶§ ±×¿¡ ÇØ´çÇÏ´Â ¾ÆÆÄÆ®°¡ ¸®½ºÆ®¹Ú½º¿¡ ³ªÅ¸³ªµµ·Ï ·çÇÎ µ¹¸®¸é¼­ ±¸Çö
    (¼Ò½º°¡ ±ä ÀÌÀ¯·Î ÇÏ¿© À̸¸Å­¸¸.)


    "SELECT°¡ 1~5±îÁö°¡ ÀÖ½À´Ï´Ù."
    ÀÌ ±¸ÀýÀº ´Ù¼Ò ÀÌÇØ°¡ µÇÁö ¾Ê´Â ºÎºÐÀ¸·Î
    ÀÏ´Ü À§ Äõ¸® ¹®ÀåÀ» Áö¿ª¸íÀ» ÀÎÀÚ·Î ÇÏ¿© SP·Î ±¸ÇöÇϸé

    CREATE PROCEDURE SearchSite
    @SIDO varchar(30)
    AS
    BEGIN
    DECLARE @sql varchar(500)
    Set @sql = 'SELECT B.DPTDES FROM BCASITA0 A, AACODEDB..AAASITA0 B WHERE A.CDSITE LIKE ''K' + @SIDO + '%'' AND A.CDCOM = ''C'' AND A.ACTIVE = ''A'' AND CDDPT = A.CDSITE AND B.CDCOM = A.CDCOM ORDER BY B.DPTDES'
    EXEC (@sql)
    END


    ASPÄڵ忡¼­ SPÈ£Ãâ
    AreaName = "Áö¿ª¸í"
    strQuery = "EXEC SearchSite '"& AreaName &"'"
    Set objRs = objCon.Execute (strQuery)

    Do While Not objRs.Eof

    Loop
    Byte * 200 Byte À̳»·Î ÀÔ·ÂÇϼ¼¿ä À̸§ : Æнº¿öµå :