Clickale label for dropdown select option group - css

Is it possible to have the label sel? ie the Swedish Cars?
I am trying to achieve an indent select menu for a search. Where swedish cars are the category. Currently you cannot select Swedish cars as it is a label. But i need to be able to search the full category Swedish Cars.
<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>

Related

custom input instead of #Html.Editorfor

I use #Html.EditorFor(model=> model.Score) in my "create" view but I would like to write
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
but how do I connect the select I write with the model.Score ???
You should use DropDownListFor instead of EditorFor.
In your case it could be:
#Html.DropDownListFor(m => m.SelectedScore, Model.PossibleScores)
where names are self-described.
An example of usage

How can I dynamically fetch tables from MsSql database using dropdown in asp.net

<asp:DropDownList ID="DropDownList1" runat="server" CssClass="account-content">
<option value="" onclick="tbl_city"> All</option>
<option value="">City</option>
<option value="">State</option>
<option value="">Country</option>
<option value="">Project</option>
<option value="">Project Detail</option>
<option value="">Project Category</option>
<option value="">User</option>
<option value="">User Detail</option>
</asp:DropDownList>
Use Entity Framework. Bind data to the gridview and use SelectedIndexChanged property of DropDownList to Redirect to that page . you can use something like this:
private DataEntities dataContext;
dataContext = new DataEntities1();
gv.DataSource = dataContext.objectName.ToList<TEntity>();
gv.DataBind();

conversion to DateTime

I have following tags to select date first is for day,second for month and third for year
<select id="d" class="styledselect-day" tabindex="6">
<option value="">dd</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select id="m" class="styledselect-month" tabindex="7" >
<option value="">mm</option>
<option value="1">Jan</option>
<option value="2">Feb</option>
<option value="3">Mar</option>
<option value="4">Apr</option>
<option value="5">May</option>
<option value="6">Jun</option>
<option value="7">Jul</option>
<option value="8">Aug</option>
<option value="9">Sep</option>
<option value="10">Oct</option>
<option value="11">Nov</option>
<option value="12">Dec</option>
</select>
<select id="y" class="styledselect-year" tabindex="8">
<option value="yyyy">yyyy</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option><option value="2008">2008</option><option value="2009">2009</option><option value="2010">2010</option><option value="2011">2011</option><option value="2012">2012</option>
</select>
And following is JS code, using which i am sending information to controller. Where i am storing these information in Session
$.ajax({
type: "POST",
url: "#Url.Action("AcceptPersonalInfo","Register")",
data: { dateDay: $("#d").val(), dateMonth: $("#m").val(), dateYear: $("#y").val() },
success: function () {
$("#contentSpan").load("/Register/ContactInfo");
}
});
Following is Session code
public void AcceptPersonalInfo(string dateDay, string dateMonth, string dateYear) //
{
Session["DateDay"] = dateDay;
Session["DateMonth"] = dateMonth;
Session["DateYear"] = dateYear;
}
Then i have to store date in DateTime object to save into databse.
p.DOB = Convert.ToDateTime(Convert.ToInt32(Session["DateMonth"]) + Convert.ToInt32(Session["DateDay"]) + Convert.ToInt32(Session["DateYear"]));
But it is not converting it into datetime. "p.DOB" is of DateTime type. Pls help why conversion failed.
Actually you are adding all integers thats why you are not getting.
try below code
string date = Session["DateMonth"].Tostring() + "-" + Session["DateDay"] + "-" + Session["DateYear"];
p.DOB=Convert.ToDateTime(date);
You can use
p.DOB=new DateTime(Convert.ToInt32(Session["DateYear"]),
Convert.ToInt32(Session["DateMonth"]),
Convert.ToInt32(Session["DateDay"]));
That is because you are converting an int. You forgot to add separator:
p.DOB = Convert.ToDateTime(
Convert.ToInt32(Session["DateMonth"]) + "/" +
Convert.ToInt32(Session["DateDay"]) + "/" +
Convert.ToInt32(Session["DateYear"]));

How to send post POST to website with specified value for INPUT

I am trying to figure out how Purdue shows their list of courses. I am examining the source code of the web page, and the closest thing I have found is this:
<!-- ** END OF twbkwbis.P_OpenDoc ** -->
<DIV class="infotextdiv"><TABLE CLASS="infotexttable" SUMMARY="This layout table contains information that may be helpful in understanding the content and functionality of this page. It could be a brief set of instructions, a description of error messages, or other special information."><TR><TD CLASS="indefault"><IMG SRC="/wtlgifs/web_info_cascade.png" ALT="Information" CLASS="headerImg" TITLE="Information" NAME="web_info" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=12 WIDTH=14></TD><TD CLASS="indefault"><SPAN class="infotext"> Use any combination of selection options to narrow your search for courses. You must choose at least one Subject. When your selection is complete, choose Get Courses to perform the search.</SPAN></TD></TR></TABLE><P></DIV>
<BR>
<FORM ACTION="/prod/bwckctlg.p_display_courses" METHOD="POST">
<INPUT TYPE="hidden" NAME="term_in" VALUE="201320">
<INPUT TYPE="hidden" NAME="sel_subj" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_levl" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_schd" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_coll" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_divs" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_dept" VALUE="dummy">
<INPUT TYPE="hidden" NAME="sel_attr" VALUE="dummy">
<TABLE CLASS="dataentrytable" SUMMARY="This table is used for input criteria for catalog courses.">
<TR>
<TD CLASS="delabel" scope="row" ><LABEL for=subj_id><SPAN class="fieldlabeltext">Subject: </SPAN></LABEL></TD>
<TD CLASS="dedefault">
<SELECT NAME="sel_subj" SIZE="3" MULTIPLE ID="subj_id">
<OPTION VALUE="AAE">AAE-Aero & Astro Engineering
<OPTION VALUE="AAS">AAS-African American Studies
<OPTION VALUE="ABE">ABE-Agri & Biol Engineering
<OPTION VALUE="ACC">ACC-Accounting
<OPTION VALUE="ACE">ACE-Adult Continuing Education
<OPTION VALUE="ACS">ACS-Applied Computer Science
<OPTION VALUE="AD">AD-Art & Design
<OPTION VALUE="AERO">AERO-Aerospace Study - IU
<OPTION VALUE="AFRO">AFRO-Afro-American Studies
<OPTION VALUE="AFT">AFT-Aerospace Studies
<OPTION VALUE="AGEC">AGEC-Agricultural Economics
<OPTION VALUE="AGR">AGR-Agriculture
<OPTION VALUE="AGRY">AGRY-Agronomy
<OPTION VALUE="AHLT">AHLT-Allied Health Sciences-IU
<OPTION VALUE="AHS">AHS-Art: History
<OPTION VALUE="AMST">AMST-American Studies
<OPTION VALUE="ANAT">ANAT-Anatomy
<OPTION VALUE="ANSC">ANSC-Animal Sciences
<OPTION VALUE="ANTH">ANTH-Anthropology
<OPTION VALUE="ARAB">ARAB-Arabic
<OPTION VALUE="ARET">ARET-Architectural Engr Tech
<OPTION VALUE="ART">ART-Architectural Technology
<OPTION VALUE="AS">AS-Administrative Sciences
<OPTION VALUE="ASAM">ASAM-Asian American Studies
<OPTION VALUE="ASCS">ASCS-Arts &Sci Career Services
<OPTION VALUE="ASIA">ASIA-Asian Studies
<OPTION VALUE="ASL">ASL-American Sign Language
<OPTION VALUE="ASM">ASM-Agricultural Systems Mgmt
<OPTION VALUE="AST">AST-Astronomy - IU
<OPTION VALUE="ASTR">ASTR-Astronomy
<OPTION VALUE="AT">AT-Aviation Technology
<OPTION VALUE="BA">BA-Business Administration
<OPTION VALUE="BAND">BAND-Bands
<OPTION VALUE="BCHM">BCHM-Biochemistry
<OPTION VALUE="BCM">BCM-Bldg Construct Mgmt Tech
<OPTION VALUE="BGR">BGR-Boiler Gold Rush
<OPTION VALUE="BHS">BHS-Behavioral Sciences
<OPTION VALUE="BIOC">BIOC-Biochemistry-IU
<OPTION VALUE="BIOL">BIOL-Biological Sciences
<OPTION VALUE="BIOP">BIOP-Biophysics
<OPTION VALUE="BIOS">BIOS-Biostatistics
<OPTION VALUE="BITN">BITN-Biotechnology
<OPTION VALUE="BME">BME-Biomedical Engineering
<OPTION VALUE="BMET">BMET-Biomedical Elect Tech
<OPTION VALUE="BMS">BMS-Basic Medical Sciences
<OPTION VALUE="BSS">BSS-Behavioral & Social Sci
<OPTION VALUE="BTNY">BTNY-Botany & Plant Pathology
<OPTION VALUE="BUFW">BUFW-Business Fort Wayne - IU
<OPTION VALUE="BUKD">BUKD-Business Kelly Direct
<OPTION VALUE="BUPA">BUPA-Bus-Profess Accountancy
<OPTION VALUE="BUS">BUS-Business
<OPTION VALUE="CAND">CAND-Candidate
<OPTION VALUE="CDFS">CDFS-Child Dev &Family Studies
<OPTION VALUE="CE">CE-Civil Engineering
<OPTION VALUE="CEM">CEM-Construction Engr & Mgmt
<OPTION VALUE="CEMT">CEMT-Constr Engr Mgmt Tech
<OPTION VALUE="CET">CET-Civil Engineering Tech
<OPTION VALUE="CFS">CFS-Consumer & Family Sciences
<OPTION VALUE="CGT">CGT-Computer Graphics Tech
<OPTION VALUE="CHE">CHE-Chemical Engineering
<OPTION VALUE="CHEM">CHEM-Chemistry - IU
<OPTION VALUE="CHHS">CHHS-College of Hlth&Human Srv
<OPTION VALUE="CHM">CHM-Chemistry
<OPTION VALUE="CHNS">CHNS-Chinese
<OPTION VALUE="CIC">CIC Traveling Scholar
<OPTION VALUE="CIMT">CIMT-Computer Integr Mfg Tech
<OPTION VALUE="CIS">CIS-Computer Info Services
<OPTION VALUE="CIT">CIT-Computer & Info Tech-IU
<OPTION VALUE="CJUS">CJUS-Criminal Justice-IU
<OPTION VALUE="CLAS">CLAS-Classical Studies - IU
<OPTION VALUE="CLCS">CLCS-Classics
<OPTION VALUE="CLPH">CLPH-Clinical Pharmacy
<OPTION VALUE="CMCI">CMCI-CIC Common Market
<OPTION VALUE="CMCL">CMCL-Communications & Cultures
<OPTION VALUE="CMET">CMET-Constr Mgmt & Engr Tech
<OPTION VALUE="CMLT">CMLT-Comparative Literature-IU
<OPTION VALUE="CMPL">CMPL-Comparative Literature
<OPTION VALUE="CNET">CNET-Construction Engr Tech
<OPTION VALUE="CNIT">CNIT-Computer & Info Tech
<OPTION VALUE="CNT">CNT-Construction Technology
<OPTION VALUE="COAS">COAS-College Arts & Sciences
<OPTION VALUE="COGS">COGS-Cognitive Science
<OPTION VALUE="COLL">COLL-College of Arts & Science
<OPTION VALUE="COM">COM-Communication
<OPTION VALUE="COMM">COMM-Communication - IU
<OPTION VALUE="CPB">CPB-Comparative Pathobiology
<OPTION VALUE="CPET">CPET-Computer Engineering Tech
<OPTION VALUE="CPSY">CPSY-Counseling Psychology
<OPTION VALUE="CRJU">CRJU-Criminal Justice-IU
<OPTION VALUE="CS">CS-Computer Sciences
<OPTION VALUE="CSCI">CSCI-Computer Science - IU
<OPTION VALUE="CSD">CSD-Communic Sci & Disorders
<OPTION VALUE="CSR">CSR-Consumer ScI & Retailing
<OPTION VALUE="DANC">DANC-Dance
<OPTION VALUE="DAST">DAST-Dental Assisting
<OPTION VALUE="DHYG">DHYG-Dental Hygiene
<OPTION VALUE="DLTP">DLTP-Dental Lab Tech
<OPTION VALUE="DPIS">DPIS-Data Proc & Info
<OPTION VALUE="EALC">EALC-East Asian Lang & Cult
<OPTION VALUE="EAS">EAS-Earth & Atmospheric Sci
<OPTION VALUE="ECE">ECE-Electrical & Computer Engr
<OPTION VALUE="ECET">ECET-Electrical&Comp Engr Tech
<OPTION VALUE="ECON">ECON-Economics
<OPTION VALUE="EDCI">EDCI-Educ-Curric & Instruction
<OPTION VALUE="EDFA">EDFA-Foundations & Admin
<OPTION VALUE="EDHI">EDHI-Education Higher
<OPTION VALUE="EDPS">EDPS-Educ-Ed'l and Psy Studies
<OPTION VALUE="EDST">EDST-Ed Leadrship&Cultrl Fnd
<OPTION VALUE="EDUA">EDUA-Education Admin- IU
<OPTION VALUE="EDUC">EDUC-Education - IU
<OPTION VALUE="EEE">EEE-Environ & Ecological Engr
<OPTION VALUE="EEN">EEN - Energy Engineering
<OPTION VALUE="EMER">EMER-Emergency Medical Service
<OPTION VALUE="EN">EN-English - IU
<OPTION VALUE="ENE">ENE-Engineering Education
<OPTION VALUE="ENG">ENG-English - IU
<OPTION VALUE="ENGL">ENGL-English
<OPTION VALUE="ENGR">ENGR-First Year Engineering
<OPTION VALUE="ENTM">ENTM-Entomology
<OPTION VALUE="ENTR">ENTR-Entrepreneurship
<OPTION VALUE="EPCS">EPCS-Engr Proj Cmity Service
<OPTION VALUE="EQU">EQU-Equine Management
<OPTION VALUE="ESC">ESC-Engineering Sciences
<OPTION VALUE="ET">ET-Electrical Technology
<OPTION VALUE="ETCS">ETCS-Engr Tech & Computer Sci
<OPTION VALUE="ETHN">ETHN-Ethnic Studies
<OPTION VALUE="FCSM">FCSM-Fam Cons Sci:Merchandise
<OPTION VALUE="FILM">FILM-Film Studies
<OPTION VALUE="FINA">FINA-Fine Arts - IU
<OPTION VALUE="FIS">FIS-Forensic & Investig Sci
<OPTION VALUE="FLAC">FLAC-Foreign Lang & Cult-IU
<OPTION VALUE="FLL">FLL-Foreign Lang & Literatures
<OPTION VALUE="FLLC">FLLC-Foster Intl Liv/Learn Ctr
<OPTION VALUE="FM">FM-Fitness Management
<OPTION VALUE="FN">FN-Foods And Nutrition
<OPTION VALUE="FNR">FNR-Forestry&Natural Resources
<OPTION VALUE="FOLK">FOLK-Folklore
<OPTION VALUE="FR">FR-French
<OPTION VALUE="FREN">FREN-French - IU
<OPTION VALUE="FRST">FRST-Foreign Study
<OPTION VALUE="FS">FS-Food Science
<OPTION VALUE="FVS">FVS-Film And Video Studies
<OPTION VALUE="FWAI">FWAI-Ft Wayne Are Inst - IU
<OPTION VALUE="FWAS">FWAS - Arts And Sciences-FW
<OPTION VALUE="GBA">GBA-Business-Accounting
<OPTION VALUE="GBG">GBG-Business-General
<OPTION VALUE="GBH">GBH-General Business Health
<OPTION VALUE="GBI">GBI-Business-International
<OPTION VALUE="GBM">GBM-Business-Marketing
<OPTION VALUE="GEOG">GEOG-Geography
<OPTION VALUE="GEOL">GEOL-Geology
<OPTION VALUE="GEP">GEP-Global Engineering Program
<OPTION VALUE="GER">GER-German
<OPTION VALUE="GERN">GERN-Gerontology
<OPTION VALUE="GNC">GNC-Community College
<OPTION VALUE="GNS">GNS-Community College
<OPTION VALUE="GRAD">GRAD-Graduate Studies
<OPTION VALUE="GREK">GREK-Greek
<OPTION VALUE="GS">GS-General Studies
<OPTION VALUE="HDFS">HDFS-Human Dev &Family Studies
<OPTION VALUE="HEBR">HEBR-Hebrew
<OPTION VALUE="HER">HER-Herron Art
<OPTION VALUE="HHS">HHS-College Health & Human Sci
<OPTION VALUE="HIA">HIA-Health Info Administration
<OPTION VALUE="HIST">HIST-History
<OPTION VALUE="HK">HK-Health And Kinesiology
<OPTION VALUE="HON">HON-Honors - IU
<OPTION VALUE="HONR">HONR-Honors
<OPTION VALUE="HORT">HORT-Horticulture
<OPTION VALUE="HPER">HPER-Health Physical Ed &Recr
<OPTION VALUE="HPSC">HPSC-History & Phil Of Science
<OPTION VALUE="HSC">HSC-Health Sciences-IU
<OPTION VALUE="HSCI">HSCI-Health Sciences
<OPTION VALUE="HSRV">HSRV-Human Services
<OPTION VALUE="HTM">HTM-Hospitality & Tourism Mgmt
<OPTION VALUE="HUMA">HUMA-Humanities - General
<OPTION VALUE="IDE">IDE-Interdisciplinary Engr
<OPTION VALUE="IDIS">IDIS-Interdisciplinary Studies
<OPTION VALUE="IE">IE-Industrial Engineering
<OPTION VALUE="IET">IET-Industrial Engr Technology
<OPTION VALUE="IIM">IIM-Integrated Info Mgmt-IU
<OPTION VALUE="ILCS">ILCS-Intl Lang&Culture Studies
<OPTION VALUE="IM">IM-Informatics
<OPTION VALUE="INFO">INFO-Informatics -IU
<OPTION VALUE="INST">INST-India Studies-IU
<OPTION VALUE="INTG">INTG-Integrated Studies
<OPTION VALUE="INTL">INTL-International
<OPTION VALUE="INTR">INTR-Interior Design-IU
<OPTION VALUE="IPPH">IPPH-Industrial & Phys Pharm
<OPTION VALUE="IST">IST-Information Systems&Tech
<OPTION VALUE="IT">IT-Industrial Technology
<OPTION VALUE="ITAL">ITAL-Italian
<OPTION VALUE="ITC">ITC-Information Tech&Computers
<OPTION VALUE="ITCS">ITCS-Indust & Tech:Constr Tech
<OPTION VALUE="ITS">ITS-Information Tech Systems
<OPTION VALUE="JOUR">JOUR-Journalism
<OPTION VALUE="JPNS">JPNS-Japanese
<OPTION VALUE="JWST">JWST-Jewish Studies
<OPTION VALUE="KINS">KINS-Kinsey Institute
<OPTION VALUE="LA">LA-Landscape Architecture
<OPTION VALUE="LALS">LALS-Latina Am&Latino Studies
<OPTION VALUE="LAS">LAS-Latin American Studies
<OPTION VALUE="LATN">LATN-Latin
<OPTION VALUE="LAW">LAW-Law
<OPTION VALUE="LBST">LBST-Liberal Studies
<OPTION VALUE="LC">LC-Languages and Cultures
<OPTION VALUE="LCME">LCME-Lafayette Center Med Educ
<OPTION VALUE="LGBT">LGBT-Lesb,Gay, Bisex&Transgndr
<OPTION VALUE="LING">LING-Linguistics
<OPTION VALUE="LS">LS-Land Surveying
<OPTION VALUE="LSTU">LSTU-Labor Studies
<OPTION VALUE="LTHN">LTHN-Lithuanian
<OPTION VALUE="MA">MA-Mathematics
<OPTION VALUE="MARS">MARS-Medieval &Renaissance Std
<OPTION VALUE="MATH">MATH-Mathematics
<OPTION VALUE="MCMP">MCMP-Med Chem &Molecular Pharm
<OPTION VALUE="ME">ME-Mechanical Engineering
<OPTION VALUE="MED">MED-Medicine
<OPTION VALUE="MEST">MEST-Medieval Studies-IU
<OPTION VALUE="MET">MET-Mechanical Engr Tech
<OPTION VALUE="MFET">MFET-Manufacturing Engr Tech
<OPTION VALUE="MGEN">MGEN-Medical Genetics
<OPTION VALUE="MGMT">MGMT-Management
<OPTION VALUE="MHHS">MHHS-Med Humanities & Hlth Sci
<OPTION VALUE="MICR">MICR-Microbiology
<OPTION VALUE="MIL">MIL-Military - IU
<OPTION VALUE="MIS">MIS-Management Info Systems
<OPTION VALUE="MNEU">MNEU-Medical Neurobiology - IU
<OPTION VALUE="MSCI">MSCI-Medical Sciences
<OPTION VALUE="MSE">MSE-Materials Engineering
<OPTION VALUE="MSL">MSL-Military Science & Ldrshp
<OPTION VALUE="MSPT">MSPT - Motorsports Studies
<OPTION VALUE="MSTD">MSTD-Museum Studies
<OPTION VALUE="MT">MT-Mathematics-Butler
<OPTION VALUE="MUS">MUS-Music History & Theory
<OPTION VALUE="NELC">NELC-Near Eastern Lang
<OPTION VALUE="NEWM">NEWM-New Media
<OPTION VALUE="NMCM">NMCM-New Media Communication
<OPTION VALUE="NRES">NRES-Natural Res & Environ Sci
<OPTION VALUE="NS">NS-Naval Science
<OPTION VALUE="NUCL">NUCL-Nuclear Engineering
<OPTION VALUE="NUPH">NUPH-Nuclear Pharmacy
<OPTION VALUE="NUR">NUR-Nursing
<OPTION VALUE="NURS">NURS-Nursing - IU
<OPTION VALUE="NUTR">NUTR-Nutrition Science
<OPTION VALUE="OBHR">OBHR-Orgnztnl Bhvr &Hum Resrce
<OPTION VALUE="OLS">OLS-Organiz Ldrshp&Supervision
<OPTION VALUE="OVST">OVST-Overseas Studies
<OPTION VALUE="PACS">PACS-Peace & Conflict Studies
<OPTION VALUE="PATH">PATH-Pathology
<OPTION VALUE="PBHL">PBHL-Public Health
<OPTION VALUE="PCTX">PCTX-Pharmacology & Toxicology
<OPTION VALUE="PES">PES-Physical Education Skills
<OPTION VALUE="PHAD">PHAD-Pharmacy Administration
<OPTION VALUE="PHAR">PHAR-Pharmacology - IU
<OPTION VALUE="PHIL">PHIL-Philosophy
<OPTION VALUE="PHPR">PHPR-Pharmacy Practice
<OPTION VALUE="PHRM">PHRM-Pharmacy
<OPTION VALUE="PHSL">PHSL-Physiology
<OPTION VALUE="PHST">PHST-Philanthropic Studies
<OPTION VALUE="PHYS">PHYS-Physics
<OPTION VALUE="PLSC">PLSC-Plant Sciences
<OPTION VALUE="PLSH">PLSH-Polish
<OPTION VALUE="POL">POL-Political Science
<OPTION VALUE="POLS">POLS-Political Science - IU
<OPTION VALUE="PPE">PPE-Professional Practice-Engr
<OPTION VALUE="PPOL">PPOL-Public Policy
<OPTION VALUE="PPT">PPT-Professional Practice-Tech
<OPTION VALUE="PSY">PSY-Psychology
<OPTION VALUE="PSYI">PSYI-Psychology -IU
<OPTION VALUE="PTGS">PTGS-Portuguese
<OPTION VALUE="PULM">PULM-Pulmonary&Crit Care Med
<OPTION VALUE="RADI">RADI-Radiology
<OPTION VALUE="RADX">RADX-Radiologic Science
<OPTION VALUE="RECR">RECR-Recreation Leadership
<OPTION VALUE="REG">REG-Reg File Maintenance
<OPTION VALUE="REL">REL-Religious Studies
<OPTION VALUE="RUSS">RUSS-Russian
<OPTION VALUE="SA">SA-Study Abroad
<OPTION VALUE="SCI">SCI-General Science
<OPTION VALUE="SE">SE-Systems Engineering
<OPTION VALUE="SERV">SERV-Service Learning
<OPTION VALUE="SHRS">SHRS-Schl of Health&Rehab Sci
<OPTION VALUE="SLA">SLA-School of Liberal Arts
<OPTION VALUE="SLAV">SLAV-Slavic Lang & Lit
<OPTION VALUE="SLHS">SLHS-Speech, Lang&Hear Science
<OPTION VALUE="SLIS">SLIS-Lib & Info Science
<OPTION VALUE="SOC">SOC-Sociology
<OPTION VALUE="SPAN">SPAN-Spanish
<OPTION VALUE="SPCH">SPCH-Speech - IU
<OPTION VALUE="SPEA">SPEA-Public & Environ Affairs
<OPTION VALUE="SRCT">SRCT-Serbo-Croatian
<OPTION VALUE="STAR">STAR-Summer Trans Advis & Reg
<OPTION VALUE="STAT">STAT-Statistics
<OPTION VALUE="SUPV">SUPV-Supervision - IU
<OPTION VALUE="SWAH">SWAH-Swahili
<OPTION VALUE="SWK">SWK-Social Work-IU
<OPTION VALUE="SWRK">SWRK-Social Work
<OPTION VALUE="TCEM">TCEM-Tour Conventns&Event Mgmt
<OPTION VALUE="TCM">TCM-Technical Communications
<OPTION VALUE="TCOM">TCOM-Communications Gts - IU
<OPTION VALUE="TECH">TECH-Technology
<OPTION VALUE="TEL">TEL-Telecommunications - IU
<OPTION VALUE="THTR">THTR-Theatre
<OPTION VALUE="TLI">TLI-Technology Ldrshp Innovatn
<OPTION VALUE="UCOL">UCOL-University College -IU
<OPTION VALUE="URDU">URDU-Urdu
<OPTION VALUE="USP">USP-Undergrad Studies Prog
<OPTION VALUE="VCD">VCD-Visual Comm & Design
<OPTION VALUE="VCS">VCS-Veterinary Clinical Sci
<OPTION VALUE="VM">VM-Veterinary Medicine
<OPTION VALUE="WLAC">WLAC-World Languages&Culture
<OPTION VALUE="WOST">WOST-Women's Studies
<OPTION VALUE="YDAE">YDAE-Youth Develop & Ag Educ
<OPTION VALUE="ZOOL">ZOOL-Zoology
</SELECT>
</TD>
</TR>
<TR>
I deleted a lot of the html code from the above to save space as it was redundant. To see all of it, you can goto the link I provided at the bottom of this post. I am not very familiar with web development languages, but I am trying to find a way to replicate this search so I can make an iPhone app that will send a POST to the website with the specified fields filled in. For example:
<FORM ACTION="/prod/bwckctlg.p_display_courses" METHOD="POST">
<INPUT TYPE="hidden" NAME="term_in" VALUE="201320">
<INPUT TYPE="hidden" NAME="sel_subj" VALUE="CS">
This should show me a list of CS courses at Purdue for the 2013 term. How do I send this to the web browser to execute? Is there a way I can construct a link out of this and paste it into my web browser to show me? I am sorry if this is a confusing question, if you don't understand what I am referring to, please goto the Purdue website yourself and select Spring 2013, then click a class type and hit search. The URL doesn't change to anything useful, but the proper data(classes) is shown on the webpage. I am wondering how to replicate this so I can use it in my iPhone app I am trying to make. For simplicities sake I am trying to replicate this in my web browser first.
Here is the link to the website I am referring to:
Purdue
Just make a file, index.html and save it to your desktop or something. Inside, just have:
<FORM ACTION="https://selfservice.mypurdue.purdue.edu/prod/bwckctlg.p_display_courses" METHOD="POST">
<INPUT TYPE="hidden" NAME="term_in" VALUE="201320">
<INPUT TYPE="hidden" NAME="sel_subj" VALUE="CS">
<INPUT TYPE="submit">
</FORM>
Then open it in your browser and click submit.
Incidentally, it looks like they may have secured their website to not allow posting to this page externally, so you may be out of luck.
Since the form is using POST method the URL does not contain any helpful information
It should be as simple as this:
<FORM ACTION="https://selfservice.mypurdue.purdue.edu/prod/bwckctlg.p_display_courses" METHOD="POST">
<INPUT TYPE="hidden" NAME="term_in" VALUE="201320">
<INPUT TYPE="hidden" NAME="sel_subj" VALUE="CS"></FORM>

Wordpress Custom Search Filter

I've can't seem to find a solution to this so I'm posting here.
Basically I'm trying to build a basic filter for property listings. All the property listings are just posts with custom fields. For example, one of the properties has these values in the custom fields:
custom field value
------------ -----
area 150
rooms 4
bathrooms 2
garage 1
alfresco 1
study 1
theatre 1
My search form HTML looks like this:
<form method="get" id="advanced_search" action="<?php echo get_settings('home'); ?>/" >
<fieldset>
<label>Rooms
<select name="rooms">
<option value="">Any</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
</label>
<label>Bathrooms
<select name="bathrooms">
<option value="">Any</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</label>
<label>Garage
<select name="garage">
<option value="">Any</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</label>
<label>Area (square metres)
<select name="garage">
<option value="">Any</option>
<option value="100">100</option>
<option value="150">150</option>
<option value="200">200</option>
<option value="250">250</option>
</select>
</label>
<label><input type="checkbox" name="theatre" value="1" /><span>Home Theatre</span></label>
<label><input type="checkbox" name="study" value="1" /><span>Study</span></label>
<label><input type="checkbox" name="alfresco" value="1" /><span>Alfresco</span></label>
<input type="submit" id="submit" value="Search" />
</fieldset>
</form>
What I am wanting to do is let the user use this filter to only show posts on a search results page that match it.
There's a slight catch too: all these custom field represents a minimum value. So if they selected "200" from "Area", "1" from "Alfresco", then it needs to show all properties that are 200 and higher and have at least 1 Alfresco area.
And - I'd like to limit the search filter to just the category called "properties".
Not asking much? :-P
Any help would be appreciated.

Resources