Solved

ASP page cut off at the end

Posted on 2013-01-24
3
276 Views
Last Modified: 2013-01-29
I've attached a screenshot of the problem as I can't show you the admin section, but the end of the page is cut off with some of the bottom drop down selects not showing. There's only one 'Category' selects, but there should be ten.

I don't recall making any major changes and can't diagnose what's causing it, but if anyonehas any ideas that'd be great.

Here's the asp/html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include virtual="/System/Startup_FranchiseClient.asp"-->
<!--#include virtual="/AdvertiserAdmin/ManageSubscriptions/ManageAdverts/i_ManageAdverts.asp"-->
<%
If Not IsFranchiseClientLoggedIn = True then
    Response.Redirect "/AdvertiserAdmin/Default.asp"
End if
EnsurePageIsHTTPS

getrs tmp,"SELECT FranchiseGID FROM Clients WHERE GID = '"&session("PublicClientGID")&"';",""
ThisFranchiseGID = tmp(0)
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Inside Guides - Create Advert</title>
<!--#include virtual="/Assets/Templates/Public/Franchise/HeadCSS.asp"-->
<script type="text/javascript" src="/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="/system/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/system/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript">
	$(window).load(function(){
		$('.editor').ckeditor( function() { /* callback code */ }, { toolbar: 'Basic' } );
	});
</script>
</head>
<body>
<!--#include virtual="/Assets/Templates/Public/Franchise/TemplateStartPages.asp"-->
   <h1>Create New Advert</h1>
    <form name="EditForm" id="EditForm" method="post" action="CreateNewAdvert.asp">
                    <%

            ' Load Data
            objConn.Open strConn
            SQLCommand = "SELECT * FROM ClientAdverts WHERE ClientSubscriptionGID = '" & CleanSQLText(Request("CSGID")) & "' AND ClientGID='" & Session("PublicClientGID") & "'"
            'response.write SQLCommand
			rsAdverts.Open SQLCommand, objConn, adOpenStatic, adLockReadOnly
            intSubscriptionAdvertCount = rsAdverts.RecordCount
            rsAdverts.Close
            SQLCommand = "SELECT * FROM uvw_AdvertiserAdmin_SubscriptionDetails WHERE GID = '" & CleanSQLText(Request("CSGID")) & "' AND ClientGID='" & Session("PublicClientGID") & "'"
            rsSubscriptions.Open SQLCommand, objConn, adOpenStatic, adLockReadOnly

            ' Choose Welcome Text based on Allowed Edit settings
            If rsSubscriptions("AllowEditAdvert") = False then %>
				<% = GetContent("AdvertiserAdminCreateNewAdvert_Welcome_NoEdit", ThisFranchiseGID) %>
            <% Else %>
    	        <% = GetContent("AdvertiserAdminCreateNewAdvert_Welcome", ThisFranchiseGID) %>
            <% End if %>
                    <%

Dim bFirstDisplay
bFirstDisplay = False
if Request.QueryString("CSGID") <> "" then
    bFirstDisplay = True
End if

%>
                    <span class="ErrorText">
                      <% = strUserError %>
                    </span>
                    <input type="hidden" name="FormAction" id="FormAction" value="" />
                    <input type="hidden" name="CSGID" id="CSGID" value="<% = Request("CSGID") %>" />
                    <input type="hidden" name="blnRequestApproval" id="blnRequestApproval" value="1" />
                    <table width="99%">
                      <%
        if rsSubscriptions("AllowEditAdvert") = True and _
            rsSubscriptions("NumberOfAdvertTemplates") > 1 then
            %>
                      <tr>
                        <th align="left" valign="top"> Template Name: </th>
                        <td align="left" valign="top"><input type="text" name="strAdvertName" value="<% = ChooseDefaultValue(Request.Form("strAdvertName"), "New Advert", bFirstDisplay) %>" size="30" maxlength="50" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top" colspan="2"> Provide a name for this advert, such as "Main Advert" or "Christmas Opening Times"<br />                        </th>
                      </tr>
                      <%
        End if
        %>
                      <tr>
                        <td align="left" valign="top" colspan="2"><br />
                            <h3>Business Information</h3>
                          <br />
                          Provide the name of your business as you wish it to be displayed in your advert<br />
                          &nbsp; </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top" width="200"> Company Name Text: </th>
                        <td align="left" valign="top"><input type="text" name="strCompanyNameText" value="<% = ChooseDefaultValue(Request.Form("strCompanyNameText"), rsSubscriptions("CompanyTradingName"), bFirstDisplay) %>" size="30" maxlength="100" />                        </td>
                      </tr>
                      <tr>
                        <td align="left" valign="top" colspan="2"><br />
                            <h3>Contact Details</h3>
                          <br />
                          The details provide here will be visible to all users of the website.<br />
                          &nbsp; </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> Address 1: </th>
                        <td align="left" valign="top"><input type="text" name="strContactAddress1" value="<% = ChooseDefaultValue(Request.Form("strContactAddress1"), rsSubscriptions("Billing_Address1"), bFirstDisplay) %>" size="30" maxlength="50" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> Address 2: </th>
                        <td align="left" valign="top"><input type="text" name="strContactAddress2" value="<% = ChooseDefaultValue(Request.Form("strContactAddress2"), rsSubscriptions("Billing_Address2"), bFirstDisplay) %>" size="30" maxlength="50" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> Town: </th>
                        <td align="left" valign="top"><input type="text" name="strContactTown" value="<% = ChooseDefaultValue(Request.Form("strContactTown"), rsSubscriptions("Billing_Town"), bFirstDisplay) %>" size="30" maxlength="50" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> County: </th>
                        <td align="left" valign="top"><input type="text" name="strContactCounty" value="<% = ChooseDefaultValue(Request.Form("strContactCounty"), rsSubscriptions("Billing_County"), bFirstDisplay) %>" size="30" maxlength="50" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> Postcode: </th>
                        <td align="left" valign="top"><input type="text" name="strContactPostcode" value="<% = ChooseDefaultValue(Request.Form("strContactPostcode"), rsSubscriptions("Billing_Postcode"), bFirstDisplay) %>" size="10" maxlength="10" />                        </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top"> Email: </th>
                        <td align="left" valign="top"><input type="text" name="strContactEmail" value="<% = ChooseDefaultValue(Request.Form("strContactEmail"), rsSubscriptions("EmailAddress"), bFirstDisplay) %>" size="30" maxlength="255" />                        </td>
                      </tr>
                      <%
        if rsSubscriptions("AllowPhoneNumber") = True then
            %>
                      <tr>
                        <th align="left" valign="top"> Telephone: </th>
                        <td align="left" valign="top"><input type="text" name="strContactTel" value="<% = ChooseDefaultValue(Request.Form("strContactTel"), rsSubscriptions("Phone"), bFirstDisplay) %>" size="30" maxlength="20" />                        </td>
                      </tr>
                      <%
        End if
        if rsSubscriptions("AllowFaxNumber") = True then
            %>
                      <tr>
                        <th align="left" valign="top"> Fax Number: </th>
                        <td align="left" valign="top"><input type="text" name="strContactFax" value="<% = ChooseDefaultValue(Request.Form("strContactFax"), rsSubscriptions("Fax"), bFirstDisplay) %>" size="30" maxlength="20" />                        </td>
                      </tr>
                      <%
        End if
        if rsSubscriptions("AllowWebLink") = True then
            %>
                      <tr>
                        <th align="left" valign="top"> Website: </th>
                        <td align="left" valign="top"><input type="text" name="strWebAddress" value="<% = Request.Form("strWebAddress") %>" size="30" maxlength="255" />                        </td>
                      </tr>
                      <%
        End if
        if rsSubscriptions("AllowLogo") = True then
            %>
                      <tr style="margin-top:0.5em;">
                        <th align="left" valign="top"> Logo: </th>
                        <td align="left" valign="baseline"> All logos must be in either JPEG or GIF format and a maximum of 125 x 125 pixels.<br />
                          Tick this box if you wish to show a logo on your advert.&nbsp;
                          <input type="checkbox" name="blnUploadLogo" /></td>
                      </tr>
                      <tr style="margin-top:0.5em;">
                        <th align="left" valign="top">Photos:</th>
                        <td align="left" valign="baseline"><p>You may upload up to 6 images to be displayed as part of a full page advert.</p>
                            <p>Tick this box if you wish to upload images.
                              <input type="checkbox" name="blnUploadImages" />
                            </p></td>
                      </tr>
                      <%
        End if
        %>
                      <tr>
                        <td align="left" valign="top" colspan="2"><br />
                            <h3>Advert Content</h3>
                          <br />
                          Using the Description and Bullet Points, describe your business as you would like it to appear on your advert.<br />
                          &nbsp; </td>
                      </tr>
                    <%
                     If rsSubscriptions("AllowSummaryText") = True then
                    %>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;"> Brief Summary: </th>
                        <td align="left" valign="top"><textarea id="article" name="strSummaryText" cols="90%"  maxlength="227" rows="6"><%=request.form("strSummaryText")%></textarea>
<script type="text/javascript">
    CKEDITOR.replace( 'article',
    {
        toolbar : 'article',
    });
</script>
</td>
                      </tr>
                    <% End if %>
                    <%
                     If rsSubscriptions("FullPageAdvert") = True then
                    %>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;"> Description Text: </th>
                        <td align="left" valign="top"><textarea id="article" name="strDescriptionText" id="strDescriptionText" cols="50" rows="10" class="editor"><%=request.form("strDescriptionText")%></textarea>
<script type="text/javascript">
    CKEDITOR.replace( 'article',
    {
        toolbar : 'article',
    });
</script>
</td>
                      </tr>
                    <% End if %>
                    <%
                     If rsSubscriptions("AllowOpeningTimes") = True then
                    %>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;"> Opening Hours: </th>
                        <td align="left" valign="top"><textarea name="strOpeningHours" id="strOpeningHours" cols="30" rows="10" class="editor"><%=request.form("strOpeningHours")%></textarea></td>
                      </tr>
                    <% End if %>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;">&nbsp;</th>
                        <td align="left" valign="top">&nbsp;</td>
                      </tr>
                    <%
                     If rsSubscriptions("AllowVoucher") = True then
                    %>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;">Voucher Heading</th>
                        <td align="left" valign="top"><input type="text" name="strVoucherTitle" value="<%=request.form("strVoucherTitle")%>" /></td>
                      </tr>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;">Voucher Contents</th>
                        <td align="left" valign="top"><textarea name="strVoucherText" cols="50" rows="3"><%=request.form("strVoucherText")%></textarea></td>
                      </tr>
                      <tr>
                        <th align="left" valign="top" style="margin-top:0;vertical-align:top;">&nbsp;</th>
                        <td align="left" valign="top">&nbsp;</td>
                      </tr>
                    <%
                     End if
                    %>

                      <%
        if rsSubscriptions("BulletPointLimit") > 0 then
            For iLoop = 1 to rsSubscriptions("BulletPointLimit")
                %>
                      <tr>
                        <th align="left" valign="top">Bullet Point
                          <% = iLoop %>
                          :</th>
                        <td align="left" valign="top"><input type="text" name="strBulletPoint<% = iLoop %>" value="<% = Request.Form("strBulletPoint" & Trim(CStr(iLoop))) %>" size="30" maxlength="30 "/>                        </td>
                      </tr>
                      <%
            Next
        End if
        %>
                      <%
        If rsSubscriptions("AllowEditAdvert") = False then
            %>
                      <tr>
                        <td align="left" valign="top" colspan="2">
                            <h3>Finish Advert</h3>
                          <br />
                          Please read and check all of this page and make sure you are happy with this advert before submitting.  You will not be able to change any details after submitting this advert for approval.<br />
                          &nbsp; </td>
                      </tr>
                      <tr id="tr1">
                        <th align="left" valign="top"> Category: </th>
                        <td align="left" valign="top"><select name="strRequestMakeLiveInSubDir1GID" style="width: 400px">
                            <%
                        CreateSelectOption "", " - Choose a Subcategory - ", rsSubscriptions("ActiveSubDir1GID")
                        SQLCommand = "USP_Helper_GetAllSelectableDirectoriesForTopDir '" & ThisFranchiseGID & "', '" & rsSubscriptions("DirectoryGID") & "'"
                        rsTemp.Open SQLCommand, objConn, adOpenStatic, adLockReadOnly
                        While Not rsTemp.EOF
                            CreateSelectOption rsTemp("GID"), rsTemp("DirectoryName"), rsSubscriptions("ActiveSubDir1GID")
                            rsTemp.MoveNext
                        Wend
                        rsTemp.Close
                        %>
                          </select>                        </td>
                      </tr>
                      <%
            if rsSubscriptions("NumberOfSubCategories") > 1 then
                %>
                      <tr id="tr2">
                        <th align="left" valign="top"> Category 2: </th>
                        <td align="left" valign="top"><select name="strRequestMakeLiveInSubDir2GID" style="width: 400px">
                            <%
                            CreateSelectOption "", " - Choose the 2nd Subcategory - ", rsSubscriptions("ActiveSubDir2GID")
                            SQLCommand = "USP_Helper_GetAllSelectableDirectoriesForTopDir '" & Session("PublicFranchiseGID") & "', '" & rsSubscriptions("DirectoryGID") & "'"
                            rsTemp.Open SQLCommand, objConn, adOpenStatic, adLockReadOnly
                            While Not rsTemp.EOF
                                CreateSelectOption rsTemp("GID"), rsTemp("DirectoryName"), rsSubscriptions("ActiveSubDir2GID")
                                rsTemp.MoveNext
                            Wend
                            rsTemp.Close
                            %>
                          </select>                        </td>
                      </tr>
                      <%
            End if
            %>
                      <tr>
                        <td align="center" valign="top" colspan="2"><input type="button" value="I have finished my Advert.  Submit it for Approval" onclick="javascript:finishedSingleAd();" />                        </td>
                      </tr>
                      <%
        Else
            %>
                      <tr>
                        <td align="left" valign="top" colspan="2"><br />
                            <h3>Finish Advert</h3>
                          <br />
                          Please take a moment to read over the contents of this page to check all of the information supplied is accurate and that you are happy with the details provided.
                          If you want this advert to become live as soon as it is approved, please ensure this box is ticked. Otherwise if unchecked, once approved, you will have the option of making this advert live at any time.<br />
                          &nbsp; </td>
                      </tr>
                      <tr>
                        <th align="left" valign="top" colspan="2"> Publish my advert straight away
                          <%
                    if intSubscriptionAdvertCount = 0 then
                        blnRequestMakeLiveWhenApproved = True
                    ElseIf intSubscriptionAdvertCount = 1 then
                        blnRequestMakeLiveWhenApproved = True
                    Else
                        blnRequestMakeLiveWhenApproved = False
                    End if
                    %>
                            <input type="checkbox" name="blnRequestMakeLiveWhenApproved" id="blnRequestMakeLiveWhenApproved" onclick="javascript:changeMakeLive();" <% = GetCheckBoxStatus_FromBoolean(blnRequestMakeLiveWhenApproved) %> />
                            <br />
                          &nbsp; </th>
                      </tr>
                      <%
						sub drawdirs(parent,parentstr)
							sql = "GetAllDirectories '"&ThisFranchiseGID&"'" & iif(len(parent)>0,",'"&parent&"'","")
							response.write sql&vbcrlf
							getrs rs,sql,""
							while not rs.eof
								if ""&rs("Subdirs") = "0" then
									' end of the trail, write the string
									response.write "<option value='"&rs("GID")&"'>"&parentstr & iif(len(""&parentstr)>0," > ","") & rs("DirectoryName")&"</option>"&vbcrlf
								else
									' subdirs exist, recurse
									drawdirs rs("GID"), parentstr & iif(len(""&parentstr)>0," > ","") & rs("DirectoryName")
								end if
							rs.movenext
							wend
						end sub
					  %>
                      <% for i = 1 to cint(rsSubscriptions("NumberOfSubCategories")) %>
                      <tr>
                      		<th align="left" valign="top">Category <%=i%>:</th>
                            <td align="left" valign="top">
                            	<select name="subcategory<%=i%>" style="width:400px;">
                                	<option value="">- Choose a Subcategory -</option>
									<% drawdirs "","" %>                                	
                                </select>
                            </td>
                      </tr>
                      
                      <% next %>
                      
                      <tr>
                        <td align="center" valign="top" colspan="2"><br />
                          &nbsp;
                          <input class="submit" type="button" value="Submit for Approval" onclick="CKupdate();submitForApproval();" />
                          <input class="submit" type="button" value="Save to Edit Later" onclick="CKupdate();saveToEditLater();" />
                          <input class="submit" type="button" value="Cancel Changes" onclick="CKupdate();cancelChanges();" />                        </td>
                      </tr>
           <% End if %>
                    </table>
 <script type="text/javascript">
    <!--
	function CKupdate(){
    for ( instance in CKEDITOR.instances )
        CKEDITOR.instances[instance].updateElement();
	}

        function changeMakeLive(){
            try{
                if(document.getElementById('blnRequestMakeLiveWhenApproved').checked==true){
                    document.getElementById('trActiveSubDir1').style.display='block';
                    document.getElementById('trActiveSubDir2').style.display='block';
                }else{
                    document.getElementById('trActiveSubDir1').style.display='none';
                    document.getElementById('trActiveSubDir2').style.display='none';
                }
            }catch(e){
            }
        }
        function finishedSingleAd(){
            if(confirm('You are about to submit your advert for approval.\n\nOnce approved, you will not be able to amend your advert.\n\nAre you sure you want to continue?')){
                document.getElementById('blnRequestApproval').value='1';
                document.getElementById('FormAction').value='CreateAdvert';
                document.getElementById('EditForm').submit();
            }   
        }
        function submitForApproval(){
            if(document.getElementById('blnRequestMakeLiveWhenApproved').checked==true){
                if(confirm('You are about to submit your advert for approval.\n\nOnce approved, this advert will be made live, replacing any existing advert.\n\nClick OK to Continue, or Cancel to abort')){
                    // Submit
                    document.getElementById('blnRequestApproval').value='1';
                    document.getElementById('FormAction').value='CreateAdvert';
                    document.getElementById('EditForm').submit();
                }
            }else{
                if(confirm('You are about to submit your advert for approval.\n\nOnce approved, you will have the option of making this advert live at any time.\n\nClick OK to Continue, or Cancel to abort')){
                    // Submit
                    document.getElementById('blnRequestApproval').value='1';
                    document.getElementById('FormAction').value='CreateAdvert';
                    document.getElementById('EditForm').submit();
                }
            }
        }
        function saveToEditLater(){
            document.getElementById('blnRequestApproval').value='0';
            document.getElementById('FormAction').value='CreateAdvert';
            document.getElementById('EditForm').submit();
        }
        function cancelChanges(){
            document.location='/AdvertiserAdmin/ManageSubscriptions/ManageAdverts/Default.asp?CSGID=<% = CleanResponseText(Request("CSGID")) %>&AutoCreate=0';
        }
    //-->
                  </script>
                    <%
rsSubscriptions.Close
objConn.Close
%>
 <br />
</form>
<!--#include virtual="/Assets/Templates/Public/Franchise/TemplateEnd.asp"-->
</body>
</html>
<!--#include virtual="/System/Shutdown.asp"-->

Open in new window

Screenshot of problem cut off area
0
Comment
Question by:UName10
  • 2
3 Comments
 
LVL 30

Expert Comment

by:LZ1
ID: 38816278
Any way you can show a live link?
0
 

Accepted Solution

by:
UName10 earned 0 total points
ID: 38816364
* I fixed it - removed some asp from the side bar.
0
 

Author Closing Comment

by:UName10
ID: 38830356
removed some asp from the side bar.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now