שלח תשובה

זירת השאלות

5 תשובות

  1. raychin הגיב:

    קוד
    הקוד של הדף ששומר את התמונה

    <HTML>
    <body bgcolor=#dda0dd>
      
    <%
       Set Upload = Server.CreateObject("Persits.Upload.1")
         Upload.OverwriteFiles = False

       Count = Upload.Save("c:upload")
    %>

    Files:<BR>

    <%
       For Each File in Upload.Files
          Response.Write File.Name &"= "& File.Path &" ("& File.Size &" bytes)<BR>"
       Next
    %>
      
    </BODY>
    </HTML>

    תודה

  2. raychin הגיב:

    קוד של הדף שדרכו מעלים תמונות


    <head>

        <title> העלאת תמונה</title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">

        <script language="javascript" type="text/javascript">
            var oSize;
            function validate(frm){
                if(!(/.(?:jpg|gif|png)$/.test(frm.sPicture.value.toLowerCase()))){
                    alert("סוגי הקבצים המותרים הם: jpg gif png")
                    return false;
                }
                if(oSize&&oSize>50){
                    alert("משקל הקובץ לא יהיה גדול מ-50K")
                    return false;
                }
                return true;
            }

            function check(){
                //made by xyxyxy.
                var oPic = document.createElement("img");
                oPic.onload = function(){
                    oSize=(oPic.fileSize/1024).toFixed(1)
                }
                oPic.src = document.getElementById("oFile").value;
            }
        </script>

    </head>

  3. raychin הגיב:

    שאלה
    כיצד אני מוסיף לדטופס העלאת התמונות קוד שימקם את התמונה במקום מסוים
    נ.ב
    מי בונה אתר בשפת ASP+JAVA SCRIPT+SQL

  4. raychin הגיב:

    שגיאה בקוד ASP
    שגיאה בקוד ASPו avraham35   ו 12:28 | 06/12/07  

    שלום רציתי לשאול מה הבעיה בקוד הבא

    <HTML>
    <BODY>
    <%
       Set Upload = Server.CreateObject("Persits.Upload.1")
       Count = Upload.Save ("c:upload")
      Dim conn, SQLstr
        Set conn = Server.CreateObject("ADODB.Connection")
        conn.Open "DATA"
         SQLstr="INSERT INTO PICTHER (PICTHER) VALUES ('"
         SQLstr = SQLstr & Request("PICTHER") & "')"
         conn.Close
        Set conn = Nothing
    %>

    Files:<BR>

    <%

        
       For Each File in Upload.Files
          Response.Write File.Name &"= "& File.Path &" ("& File.Size &" bytes)<BR>"
      

       Next
    %>
      
    </BODY>
    </HTML>

    שהוא נותן לי הודעת שגיה  שהיא:

    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.

    ——————————————————————————–

    Please try the following:

    Click the Refresh button, or try again later.

    Open the localhost home page, and then look for links to the information you want.
    HTTP 500.100 – Internal Server Error – ASP error
    Internet Information Services

    ——————————————————————————–

    Technical Information (for support personnel)

    Error Type:
    Request object, ASP 0208 (0x80004005)
    Cannot use the generic Request collection after calling BinaryRead.
    /project1/UploadScript1.asp, line 11

    Browser Type:
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)

    Page:
    POST 22594 bytes to /project1/UploadScript1.asp

    POST Data:
    error '80020009'
    Exception occurred.

    /iisHelp/common/500-100.asp, line 223

    הקוד בשורה 11 הוא:

    SQLstr = SQLstr & Request("PICTHER") & "')"

שלח תשובה