[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

FrontPage and ASP - Help Needed Please!!

Posted on 2004-03-21
10
Medium Priority
?
197 Views
Last Modified: 2013-12-24
Hi,

I am creating my first ASP page in FrontPage but when I try to preview it or run it I just get the following error:

<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
     Err.Clear

     Set fp_conn =  Server.CreateObject("ADODB.Connection")
     FP_DumpError strErrorUrl, "Cannot create connection"

     Set fp_rs = Server.CreateObject("ADODB.Recordset")
     FP_DumpError strErrorUrl, "Cannot create record set"

     fp_conn.Open Application("survey_ConnectionString")
     FP_DumpError strErrorUrl, "Cannot open database"

     fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
     FP_DumpError strErrorUrl, "Cannot open record set"

     fp_rs.AddNew
     FP_DumpError strErrorUrl, "Cannot add new record set to the database"
     Dim arFormFields0(11)
     Dim arFormDBFields0(11)
     Dim arFormValues0(11)

     arFormFields0(0) = "Topic"
     arFormDBFields0(0) = "Topic"
     arFormValues0(0) = Request("Topic")
     arFormFields0(1) = "Name"
     arFormDBFields0(1) = "Name"
     arFormValues0(1) = Request("Name")
     arFormFields0(2) = "CourseTitle"
     arFormDBFields0(2) = "CourseTitle"
     arFormValues0(2) = Request("CourseTitle")
     arFormFields0(3) = "Choice"
     arFormDBFields0(3) = "Choice"
     arFormValues0(3) = Request("Choice")
     arFormFields0(4) = "Choice2"
     arFormDBFields0(4) = "Choice2"
     arFormValues0(4) = Request("Choice2")
     arFormFields0(5) = "Choice3"
     arFormDBFields0(5) = "Choice3"
     arFormValues0(5) = Request("Choice3")
     arFormFields0(6) = "Choice4"
     arFormDBFields0(6) = "Choice4"
     arFormValues0(6) = Request("Choice4")
     arFormFields0(7) = "Choice5"
     arFormDBFields0(7) = "Choice5"
     arFormValues0(7) = Request("Choice5")
     arFormFields0(8) = "Choice6"
     arFormDBFields0(8) = "Choice6"
     arFormValues0(8) = Request("Choice6")
     arFormFields0(9) = "Choice7"
     arFormDBFields0(9) = "Choice7"
     arFormValues0(9) = Request("Choice7")
     arFormFields0(10) = "Choice8"
     arFormDBFields0(10) = "Choice8"
     arFormValues0(10) = Request("Choice8")

     FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


     fp_rs.Update
     FP_DumpError strErrorUrl, "Cannot update the database"

     fp_rs.Close
     fp_conn.Close

     FP_FormConfirmationFromArrays "text/html; charset=windows-1252",_
                              "Form Confirmation",_
                              "Thank you for submitting the following information:",_
                              "submission_form.asp",_
                              "Return to the form.",_
                              arFormDBFields0,_
                              arFormValues0

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<% Response.Buffer = True %>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Results -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--mstheme--><link rel="stylesheet" type="text/css" href="../../../_themes/slate/slat1011.css"><meta name="Microsoft Theme" content="slate 1011">
</head>

<body>

<table width="100%" align=left>
  <tr>
    <td width="50%">
       <b><font size=+3 color="#000080"> Submission Form </font></b>
     </td>
    <td width="50%" align=right>
      <table>
        <tr>
          <td>
          <a href="../results_page.asp" target="_top">Results Page</a> |
Submission Form

          </td>
        </tr>
      </table>
     </td>
  </tr>
</table>


<p>
<br clear="all">
<hr>
<p>

<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Name.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.CourseTitle.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"CourseTitle\" field.");
    theForm.CourseTitle.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form METHOD="POST" action="submission_form.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--">

<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="survey" S-RecordSource="Results"  S-Form-Fields="Topic Name CourseTitle Choice Choice2 Choice3 Choice4 Choice5 Choice6 Choice7 Choice8" S-Form-DBFields="Topic Name CourseTitle Choice Choice2 Choice3 Choice4 Choice5 Choice6 Choice7 Choice8 " B-UseDBFieldsForConfirmation="True" U-ASP-Include-Url="../../../_fpclass/fpdbform.inc" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" i-checksum="52631" endspan -->

<p><b>Topic</b><br>
<select size="1" name="Topic">     <option value="Option 1">IT Facilities</option>
     <option value="Option 2">Library</option>
     <option value="Option 3">Canteen</option>
     <option value="Option 4">Learning Resource Centre</option>
     <option value="Option 5">Teaching Rooms</option>
</select>
<br>
</p>
<p><b>Name</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="Name" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="Name" size="64" value="" maxlength="255"><br>
</p>
<p><b>Course Title</b><br>
&nbsp;<!--webbot bot="Validation" s-display-name="CourseTitle" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="CourseTitle" size="64" value="" maxlength="255"><br>
</p>
<p><b>The Facilities that are available are:</b><br>
<p><input type="radio" name="Choice" value=1 >Of a Very High standard</p>
<p><input type="radio" name="Choice" value=2 >Of a Good Standard</p>
<p><input type="radio" name="Choice" value=3 >Average</p>
<p><input type="radio" name="Choice" value=4 >Of a Below Average Standard</p>
<br>
<b>Do you think that the resources available are helpful?</b><br>
<p><input type="radio" name="Choice2" value=1 >Yes</p>
<p><input type="radio" name="Choice2" value=2 >No</p>
<p><input type="radio" name="Choice2" value=3 >Decline to say</p>
<br>
<b>The Condition of the equipment provided is:</b><br>
<p><input type="radio" name="Choice3" value=1 >Good</p>
<p><input type="radio" name="Choice3" value=2 >Acceptable</p>
<p><input type="radio" name="Choice3" value=3 >Average</p>
<p><input type="radio" name="Choice3" value=4 >Poor</p>
<br>
<b>&nbsp;Have you ever been unable to use the equipment provided in any way?</b><br>
<p><input type="radio" name="Choice4" value=1 >Yes</p>
<p><input type="radio" name="Choice4" value=2 >No</p>
&nbsp;<p><b>Have you ever had to report the equipment for being faulty?<u><br>
</u></b><br>
<input type="radio" name="Choice5" value=1 >Yes</p>
<p><input type="radio" name="Choice5" value=2 >No</p>
<p>&nbsp;</p>
<p><b>&nbsp;Has there ever been a time when the resources or equipment were
unavailable for use?</b><br>
</p>
<p><input type="radio" name="Choice6" value=1 >Yes</p>
<p><input type="radio" name="Choice6" value=2 >No</p>
<p>&nbsp;</p>
<p><b>If improvements were to be made, what area would you concentrate on?</b><br>
</p>
<p><input type="radio" name="Choice7" value=1 >Aesthetics</p>
<p><input type="radio" name="Choice7" value=2 >Facilities</p>
<p><input type="radio" name="Choice7" value=3 >Resources</p>
<p><input type="radio" name="Choice7" value=4 >Technology</p>
<br>
</p>
<p><b>Your overall opinion of the College as a whole can be described as:</b><br>
<p><input type="radio" name="Choice8" value=1 >Very Pleased</p>
<p><input type="radio" name="Choice8" value=2 >Pleased</p>
<p><input type="radio" name="Choice8" value=3 >Acceptable</p>
<p><input type="radio" name="Choice8" value=4 >Terrible</p>
<p>&nbsp;</p>
<p>If you have any additional comments, please enter them here <b>- <u>Thanks
for participating!!</u></b></p>
<textarea rows="2" name="S1" cols="97"></textarea><br>
</p>


<p><input type="submit" value="    OK    "><input type="reset" value=" Reset "></p>

</form>

</body>

</html>

And my page doesn't load, how do I get to load it and test it?.  My page is a survey with a Main Page that links to the Submissions Page and Results page, the aforementioned error is given when I try to either access the Submissions page or when I preview it in FrontPage (enter data and then click 'Ok'), when previewing in FrontPage it also gives a script error saying that an object is expected.

Any help would be greatly appreciated as I have never done ASP before.  

Thanks,

Ian

0
Comment
Question by:Ianwuk
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 10644834
Just 2 initial thoughts...

1. The page needs an asp extension

2. You need to preview this in your browser at:

http://localhost/your web name/some folder/submission.asp

You can't preview generated database code in FrontPage's preview screen - that is only for previewing layout.

You need to view the page in the browser...

Thanks,
Sean

0
 

Author Comment

by:Ianwuk
ID: 10645214
Hi,

I currently have the main page called 'Survey.html', I uploaded that and ran it, it loaded the Main Page fine (as in published onto the Internet) but when I clicked the Submissions link it gave the error mentioned, should the main page be called 'Survey.asp'?.

Thanks very much for your help.

Ian
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10645307
Yes - any page that has asp code in it needs to have the asp extension to function correctly.

Thanks,
Sean
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:Ianwuk
ID: 10645502
Hi,

How do you save a page with an ASP extension within FrontPage as it is not listed under the File Type options.  I have tried renaming it through Windows and I then uploaded it but despite loading the Main Page I can't seem to access the Submission Page which is what I want to start with.

The path is correct but it just says file not found, you can see for yourself at:

http://www.eyewerks.com/eyewerks%20v2/survey.asp

Thanks for your continuing support, it is much appreciated
0
 

Author Comment

by:Ianwuk
ID: 10645508
Okay, it doesn't say 'File not Found' as such, just brings up the error previously mentioned, why is it not working?.

Thanks for your time and expertise!.

Ian
0
 
LVL 19

Expert Comment

by:webwoman
ID: 10735420
What kind of server do you have? If it's NOT Windows running IIS, it's very possible that ASP WILL NOT WORK AT ALL.

Find out.
0
 

Expert Comment

by:ryujingt3
ID: 10735626
Hi,

Currently I have no server, it is a College project that I am working, my PC is running Windows XP Home that does not support IIS so I cannot test my site.  But I have heard of server software that can emulate a server, does anyone know of a program that will allow me to run my ASP page that I created in FP?.

Thanks
0
 

Expert Comment

by:ryujingt3
ID: 10735631
Hi, sorry for the confusion, I realised I had two accounts, one was made before the site was overhauled.  Thanks for your input.
0
 
LVL 29

Accepted Solution

by:
coreybryant earned 0 total points
ID: 11689882
Force Accept

coreybryant
FrontPage Page Editor
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Suggested Courses

872 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