Code confusion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saiprasanthi
    New Member
    • Oct 2006
    • 7

    Code confusion

    HI!!!

    I request you to kindly go through the code... I'm getting an error in line 71 as
    "Unterminat ed String Constant" which I'm not able to find out. Please help me at the earliest.

    -------------------------------------------------------------------------------------------------------------------
    <%@ Language=VBScri pt %>
    <% Response.CacheC ontrol = "no-cache" %>
    <%Response.Expi res = -1%>
    <%
    if isEmpty(Session ("uid")) then
    Response.Redire ct "../blank.htm"
    Response.End
    end if
    %>
    <!-- #include file="../connection.asp" -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>ISL e-Facilitator</title>
    <meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
    <meta name="vs_target Schema" content="http://schemas.microso ft.com/intellisense/ie5">
    <link rel="stylesheet " type="text/css" href="../../stylesheet/isl.css">
    <script language="javas cript" type="text/javascript" src="../../javascript/isl.js"></script>
    <script language="javas cript">
    <!--
    function openDiv(strDiv) {
    if(strDiv == "Div1"){
    document.getEle mentById("Div2" ).style.visibil ity = "hidden";
    document.getEle mentById("ResFi le").classNam e = "NonActiveTabHe ader"
    document.getEle mentById("Div1" ).style.visibil ity = "visible";
    document.getEle mentById("PrjFi le").classNam e = "ActiveTabHeade r"

    }else if(strDiv == "Div2"){
    document.getEle mentById("Div1" ).style.visibil ity = "hidden";
    document.getEle mentById("PrjFi le").classNam e = "NonActiveTabHe ader"
    document.getEle mentById("Div2" ).style.visibil ity = "visible";
    document.getEle mentById("ResFi le").classNam e = "ActiveTabHeade r"
    }
    }

    function openFileRes(str FileName){
    strURL = "../../ISLResource/"+strFileNa me;
    window.open(str URL,"_new")
    }

    function openPage(strURL ){
    window.open(str URL,"rightFrame ","");
    }

    function uploadRes(){
    if(document.upl oadPrj.briefdes c.value.length == 0){
    alert("Please enter a small description about the file.");
    document.upload Prj.briefdesc.f ocus();
    return false;
    }

    if(document.upl oadPrj.briefdes c.value.length > 500){
    alert("Descript ion must not be more than 500 characters.");
    document.upload Prj.briefdesc.f ocus();
    return false;
    }
    document.upload Prj.action = "submituploadRe s.asp";
    document.upload Prj.submit();
    }
    -->
    </script>
    </head>
    <body topmargin="10" onload="openDiv ('Div1')">
    <table border="0" align="left" width="525" cellpadding="0" cellspacing="0" >
    <tr>
    <td id="PrjFile" width="110" height="20" align="center" class="ActiveTa bHeader" onmouseover="st yle.cursor='han d';" onclick="openDi v('Div1')">Down load</td>
    <td id="ResFile" width="100" height="20" align="center" class="NonActiv eTabHeader" onmouseover="st yle.cursor='han d';" onclick="openDi v('Div2')">Uplo ad</td>
    <td width="325" height="20"></td>
    </tr>
    <tr>
    <td>

    <div id="Div1" style="position :absolute; visibility:hidd en; border-style:solid; border-width:1px; border-color:#788A96">
    <table border="0" align="left" width="525" cellpadding="0" cellspacing="2" >
    <tr>

    <!--
    -->
    </tr>
    <%
    'Set Rs = Con.Execute("se lect file_name, upload_by, description from resource_file order by file_date desc")
    Set Rs = Con.Execute("db o.listResFile " & Request.QuerySt ring("beginRec" ) & "," & Request.QuerySt ring("endRec") & "," & Request.QuerySt ring("pageid"))
    If Not Rs.EOF Then
    Response.Write "<td width=225 height=20 bgcolor=silver style=""padding-left:5px;"" class=ProjectLi st><b>Name</b></td>"
    Response.Write "<td width=225 height=20 bgcolor=silver style=""padding-left:5px;"" class=ProjectLi st><b>Upload By</b></td>"
    Response.Write "<td width=75 height=20 bgcolor=silver style=""padding-left:5px;"" class=ProjectLi st><b>Size</b></td>"
    While Not Rs.EOF
    fPath = Server.MapPath( "../../ISLResource/" & Rs(0))
    Set fso = Server.CreateOb ject("Scripting .FileSystemObje ct")
    Set file = fso.GetFile(fPa th)
    Response.Write "<tr>"
    Response.Write "<td width=225 height=18 bgcolor=#dcdcdc style=""padding-left:2px;"" class=ProjectLi st><a onmouseover=""s tyle.cursor='ha nd';"" onclick=openFil eRes('" & file.name & "')>" & file.name & "</a></td>"
    Response.Write "<td width=225 height=18 bgcolor=#dcdcdc style=""padding-left:2px;"" class=ProjectLi st nowrap>" & Rs(1) & "</td>"
    Response.Write "<td align=right width=75 height=18 bgcolor=#dcdcdc style=""padding-right:2px;"" class=ProjectLi st>" & CInt((file.Size/1024)) & " Kb</td>"
    Response.Write "</tr>"
    Response.Write "<tr>"
    Response.Write "<td width=525 colspan=3 height=18 bgcolor=#E5E6E8 style=""padding-left:2px;paddin g-bottom:10px;"" class=ProjectLi st nowrap>" & Rs(2) & "</td>"
    Response.Write "</tr>"
    Set folder = Nothing
    Set fso = Nothing
    Rs.MoveNext
    Wend

    iFirst = 0
    iLast = 10
    Rs.MoveFirst
    Response.Write "<tr>"
    Response.Write "<td width=525 colspan=3 height=18 align=right style=""padding-top:10px;paddin g-left:2px;paddin g-bottom:10px;"" class=ProjectLi st nowrap>"
    If Rs(3) > 1 Then
    For i=1 to Rs(3)
    If i = CInt(Request.Qu eryString("page id")) Then
    Response.Write i & " "
    Else
    strURL = "download.asp?b eginRec=" & iFirst & "&endRec=" & iLast & "&pageid=" & i
    Response.Write "<a onmouseover=""s tyle.cursor='ha nd';"" onclick=""openP age('" & strURL & "')""><u>" & i & "</u></a> "
    End If
    iFirst = iFirst + 10
    iLast = iLast + 10
    Next
    End If
    Response.Write "</td>"
    Response.Write "</tr>"
    Else
    Response.Write "<tr>"
    Response.Write "<td height=18 align=center style=""padding-left:2px;"" class=ProjectLi st>File Not Available.</td>"
    Response.Write "</tr>"
    End If
    %>
    </table>
    </div>

    <div id="Div2" style="position :absolute; visibility:hidd en; border-style:solid; border-width:1px; border-color:#788A96">
    <form name="uploadPrj " method="post" enctype="multip art/form-data">
    <table border="0" align="left" width="100%" cellpadding="0" cellspacing="0" >
    <tr><td colspan="2" style="padding-left:10px; padding-right:5px; padding-top:10px; text-align:justify" class="ProjectL ist">
    Upload only those files which are not related to your project. The files uploaded from this screen goes to
    a common folder from where everybody can access them.
    </td></tr>
    <tr>
    <td style="padding-left:10px; padding-right:5px; padding-top:10px;" class="ProjectL ist">File</td>
    <td align="right" style="padding-top:10px; padding-right:5px;">
    <input type="file" size="60" name="fileprj1" class="FormObje ct"></td>
    </tr>
    <tr>
    <td valign="top" style="padding-left:10px; padding-right:5px; padding-top:10px;" class="ProjectL ist">Descriptio n</td>
    <td align="right" style="padding-top:10px;paddin g-right:5px;">
    <textarea rows="5" cols="70" name="briefdesc " class="FormObje ct"></textarea></td>
    </tr>
    <tr><td colspan="2" align="right" style="padding-right:5px; padding-top:5px;">
    <a href="#" onclick="upload Res()">
    <img src="../../images/floppy.jpg" border="0" alt="Save" >
    </td></tr>
    </table>
    </form>
    </div>

    </td>
    </tr>
    </table>
    </body>
    </html>


    ---------------------------------------------------------------------------------

    Thanks in advance.

    Prasanthi
  • nedu
    New Member
    • Nov 2006
    • 65

    #2
    Hi Frnd ,

    R u sure that for all concatenation to the next line of Vb Script contains
    the following . .. &_

    Plz confirm me .. .

    Regards

    (M.Nedu . .)
    Last edited by sashi; Dec 4 '06, 05:46 PM. Reason: Removed email address from message

    Comment

    Working...