Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with default page - jumpmenu

Status
Not open for further replies.

cindy0904

Technical User
May 30, 2002
29
US
Hi, I have a page I've been testing that has two dynamic pulldown boxes -- a user chooses the first pulldown and that choice is posted to the same page, once the second choice is made (based on the first choice), the results are posted to the results page (results.asp). It works great EXCEPT when I try to make this page the index.asp page (my default page). I get an extra slash in the code when the results post to the same page(ie: Any ideas????

Thanks for any help.
Cindy


<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;results.asp&quot;>
<% if (Request.QueryString(&quot;ParentID&quot;) = &quot;&quot;) then%>
<select name=&quot;ParentID&quot; onChange=&quot;MM_jumpMenu('parent',this,1)&quot;>
<% else %><select name=&quot;ParentID&quot; onChange=&quot;MM_jumpMenu('parent',this,1)&quot;>
<% end if %>
<%
If NOT RSParentID.EOF Then
While NOT RSParentID.EOF
%>
<% if(Request.QueryString(&quot;ParentID&quot;) <> &quot;&quot;) then %>
<% if(RSParentID(&quot;ParentID&quot;) = Request.QueryString(&quot;ParentID&quot;)) then %>
<option value=&quot;<%=RSParentID(&quot;ParentID&quot;)%>&quot; SELECTED><%=(RSParentID(&quot;ParentID&quot;))%></option>
<% else %>
<option value=&quot;<%=RSParentID(&quot;ParentID&quot;)%>&quot;><%=(RSParentID(&quot;ParentID&quot;))%></option>
<% end if%>
<% else %>
<option value=&quot;<%=RSParentID(&quot;ParentID&quot;)%>&quot;><%=(RSParentID(&quot;ParentID&quot;))%></option>
<% end if%>
<%
RSParentID.MoveNext
Wend
End If
If (RSParentID.CursorType > 0) Then
RSParentID.MoveFirst
Else
RSParentID.Requery
End If
%></select>
<select name=&quot;ChildID&quot;>
<%
If NOT RecordSet1.EOF Then
While (NOT Recordset1.EOF)
%>
<option value=&quot;<%=(Recordset1(&quot;ChildID&quot;))%>&quot; ><%=(Recordset1(&quot;ChildID&quot;))%></option>
<%
Recordset1.MoveNext()
Wend
End If
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Search!&quot;>
</form>
 
Well, offhand I can't see why it wouldn't work, i'm running a little slow right now, but an easy hack would be just to name the file something else and write a two default.asp file to redirect to the new file :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top