HTTP 405 Error Message

 
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP
View previous topic :: View next topic  
Author Message
m_b_scdt
-


Joined: 13 Jul 2005
Posts: 2

PostPosted: Wed Jul 13, 2005 3:04 pm    Post subject: HTTP 405 Error Message Reply with quote

Gday,

Just would like to know, why I keep getting this error message when I run ASP code which is embedded inside html code.

Here is the code

thanks very much.

Mat Brooks

<CODE>

<html>

<head>
<title>Medical Restrictions</title>

<script>

<!--
var helpArray =
["Enter your Pmkeys Number in this area, and then hit search.",
"The limitations as per documentation, for example - no drill would be entered as drill.",
"Helpfull messages are displayed here."];

function helpText( messageNum )
{
med_lim.helpBox.value = helpArray [ messageNum ];
}
// -->
</script>

<script>
alert( "To start the session, please enter your Pmkeys in the field provided and press search." );
</script>

</head>

<body background = "Pictures/tubeblue.jpeg">

<%
dim strPmkeys 'String Pmkeys
dim LoadingValues 'Boolean to check if open database
dim sqlstring
dim rst 'Recordset

strPmkeys = request("Pmkeys")

if strPmkeys <> "" then
LoadingValues = True
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "csc_patmas.mdb"
sqlstring = "Select * from personal_particulars where Pmkeys = " & strPmkeys
set rst = conn.execute(sqlstring)
if not rst.eof then
' open recordset using sqlstring
'Assign variables
Pmkeys = rst("Pmkeys")
Rank = rst("Rank")
First_Name = rst("First_Name")
Last_Name = rst("Last_Name")
else
Response.Write("<h3>No Record Found!</h3>")
LoadingValues = False
end if
rst.close
end if
%>

<center>
<p><h1>Medical Restrictions</h1></p>

<form name="form1" method="post" action=" ">
<b>Pmkeys:</b>
<input name = "Pmkeys" type = "number" size = "7" onfocus = "helpText(0)" onblur = "helpText(2)"><% if Loadingvalues = True then response.write ("Value = '" & Pmkeys & "'")%>
<input type="submit" name="Submit" value="Search">
</form>
<p><u><font color="blue" size="8" face="arial"></font></u></p>

<form id = "med_lim" method = "post" action = "med_lim.asp">

<p><label></label>
</p>

<label><b>Rank:</b>
<select name = "Rank">
<option selected = "selected"><% if Loadingvalues = True then response.write ("Value = '" & rank & "'")%> SCDT</option>
</select>
</label></p>

<label><b>First Name:</b>
<input name = "First_Name" type = "text" size = "25" ><% if Loadingvalues = True then response.write ("Value = '" & First_Name & "'")%>
</label>

<p><label><b>Last Name:</b>
<input name = "Last_Name" type = "text" size = "25" ><% if Loadingvalues = True then response.write ("Value = '" & Last_Name & "'")%>
</label>
<label><p><b>Company:</b>
<select name = "Company">
<option selected = "selected"><% if Loadingvalues = True then response.write ("Value = '" & Company & "'")%> Kokoda</option>
<option>Gallipoli</option>
<option>Kapyong</option>
<option>Long Tan</option>
</select>
</label>
<label><b>Class:</b>
<select name = "Class">
<option selected = "selected"><% if Loadingvalues = True then response.write ("Value = '" & Class & "'")%> I </option>
<option>II</option>
<option>III</option>
</select>
</label></p>


<p><label><b>Status:</b>
<input name = "Status" type = "text" size = "25" onfocus = "helpText(1)" onblur = "helpText(2)">
</label>

<p><label><b>Date Started:</b>
<select name = "Date_Start_Day">
<option selected = "selected"> 01 </option>
<option> 02 </option>
<option> 03 </option>
<option> 04 </option>
<option> 05 </option>
<option> 06 </option>
<option> 07 </option>
<option> 08 </option>
<option> 09 </option>
<option> 10 </option>
<option> 11 </option>
<option> 12 </option>
<option> 13 </option>
<option> 14 </option>
<option> 15 </option>
<option> 16 </option>
<option> 17 </option>
<option> 18 </option>
<option> 19 </option>
<option> 20 </option>
<option> 21 </option>
<option> 22 </option>
<option> 23 </option>
<option> 24 </option>
<option> 25 </option>
<option> 26 </option>
<option> 27 </option>
<option> 28 </option>
<option> 29 </option>
<option> 30 </option>
<option> 31 </option>
</select>

<select name = "Date_Start_Month">
<option selected = "selected"> Jan </option>
<option> Feb </option>
<option> Mar </option>
<option> Apr </option>
<option> May </option>
<option> Jun </option>
<option> Jul </option>
<option> Aug </option>
<option> Sep </option>
<option> Oct </option>
<option> Nov </option>
<option> Dec </option>
</select>

<select name = "Date_Start_Year">
<option selected = "selected"> 05 </option>
<option> 06 </option>
<option> 07 </option>
<option> 08 </option>
<option> 09 </option>
<option> 10 </option>
<option> 11 </option>
<option> 12 </option>
<option> 13 </option>
<option> 14 </option>
<option> 15 </option>
<option> 16 </option>
<option> 17 </option>
<option> 18 </option>
<option> 19 </option>
<option> 20 </option>
</select>
</label>

<p><label><b>Date Finished:</b>
<select name = "Date_Finish_Day">
<option selected = "selected"> 01 </option>
<option> 02 </option>
<option> 03 </option>
<option> 04 </option>
<option> 05 </option>
<option> 06 </option>
<option> 07 </option>
<option> 08 </option>
<option> 09 </option>
<option> 10 </option>
<option> 11 </option>
<option> 12 </option>
<option> 13 </option>
<option> 14 </option>
<option> 15 </option>
<option> 16 </option>
<option> 17 </option>
<option> 18 </option>
<option> 19 </option>
<option> 20 </option>
<option> 21 </option>
<option> 22 </option>
<option> 23 </option>
<option> 24 </option>
<option> 25 </option>
<option> 26 </option>
<option> 27 </option>
<option> 28 </option>
<option> 29 </option>
<option> 30 </option>
<option> 31 </option>
</select>

<select name = "Date_Finish_Month">
<option selected = "selected"> Jan </option>
<option> Feb </option>
<option> Mar </option>
<option> Apr </option>
<option> May </option>
<option> Jun </option>
<option> Jul </option>
<option> Aug </option>
<option> Sep </option>
<option> Oct </option>
<option> Nov </option>
<option> Dec </option>
</select>

<select name = "Date_Finish_Year">
<option selected = "selected"> 05 </option>
<option> 06 </option>
<option> 07 </option>
<option> 08 </option>
<option> 09 </option>
<option> 10 </option>
<option> 11 </option>
<option> 12 </option>
<option> 13 </option>
<option> 14 </option>
<option> 15 </option>
<option> 16 </option>
<option> 17 </option>
<option> 18 </option>
<option> 19 </option>
<option> 20 </option>
</select>
</label>

<p><input type = "submit" value = "Add New record">
<input type = "reset" value = "Reset">
</p>

<textarea name = "helpBox" rows = "4" cols = "45">Helpfull messages are displayed here.</textarea>
</form>

</body>

</html>
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Jul 13, 2005 9:49 pm    Post subject: Reply with quote

The only reason why this happens is because you didn't set the action
attribute in your form tag , make sure its a relative CGI Scripts path.

Sincerely , TRUSTpunk
Back to top View user's profile Send private message Visit poster's website
m_b_scdt
-


Joined: 13 Jul 2005
Posts: 2

PostPosted: Thu Jul 14, 2005 5:38 am    Post subject: HTTP 405 Error Reply with quote

Thanks very much mate, I didnt even realise what I had done.

Mat Broos
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group