Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Auto Submit on dropdown box

Posted on 2016-10-30
3
Medium Priority
?
114 Views
Last Modified: 2016-10-30
Hi there, I have created an auto submit for a dropdown box, however running into some issues...

The issue is the page submits, but doesnt go to the Request.Form I want it to (below)

In another question (https://www.experts-exchange.com/questions/28979728/Auto-Submit-on-dropdown-box.html) They have mentioned that I 'need to alter the ASP code to detect when the select list value has changed and redirect accordingly.'

Unfortunately, this is where i am lost :(
<%
If Request.Form("go")="Go!" Then
	oConn.Execute("INSERT INTO site_log(log_session,brand_ID,log_page,log_date,log_time) VALUES("&Session_ID&",'"&SubDomain("brand_ID")&"','Show "&Request.Form("championship")&"','"&Date()&"','"&Time()&"')")
	Set Championship=oConn.Execute("SELECT * FROM codes WHERE code_name='"&Request.Form("championship")&"'")
	Response.Redirect("?code="&Championship("code_short"))
Else
' cut from code
%>
	<td width=330 height=40 nowrap align=middle>&nbsp;&nbsp;<select name=championship class=inputbox onchange='this.form.submit()'>
	<option>Select Championship</option>
	<option>---</option>
	<option>Championship("code_name")</option>
	</select><noscript><input type=submit value=Go! name=go class=inputsubmit></noscript></td>
<%
End If
%>

Open in new window


Any help is appreciated
0
Comment
Question by:Graeme
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 2000 total points
ID: 41866445
try change:

If Request.Form("go")="Go!" Then

Open in new window


to:

If Request.Form("championship") <> "" Then

Open in new window


or:

If Request.Form <> "" Then

Open in new window

0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 41866447
also... what's your <form> tag looks like? is it post to the same page or another different page?
0
 

Author Closing Comment

by:Graeme
ID: 41866455
[code]If Request.Form("championship") <> "" Then[/code] worked perfectly!

Thank you!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

670 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