SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Parts Search

  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    berkeley
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Parts Search

    I was wondering how I could go about learning how to code something that would allow for a menu search like this one using PHP:

    http://www.knfilterchargers.com/search/appsearch.aspx

    it allows one to pick a year, then the make, then the model, then the engine size.

    I am not very experienced with PHP and would like to know if something like this would be difficult. My server doesn't support ASP.

  2. #2
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no reason why not. It is just using javascript to submit the form everytime a selection is made. Write an "appsearch.php" that is a simple Page Controller to track the state. Here is the code from the page to which you linked:
    Code:
    <form name="Form1" method="post" action="appsearch.aspx" id="Form1">
    <input type="hidden" name="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" value="" />
    <input type="hidden" name="__VIEWSTATE" value="dDwtMTM5MTYxMDgwMTt0PDtsPGk8MT47PjtsPHQ8O2w8aTw4PjtpPDMwPjtpPDMyPjs+O2w8dDx0PHA8cDxsPERhdGFNZW1iZXI7RGF0YVRleHRGaWVsZDs+O2w8WWVhcnM7WWVhcjs+Pjs+O3Q8aTw2Nj47QDxcPC0gU2VsZWN0IFllYXIgLVw+OzIwMDU7MjAwNDsyMDAzOzIwMDI7MjAwMTsyMDAwOzE5OTk7MTk5ODsxOTk3OzE5OTY7MTk5NTsxOTk0OzE5OTM7MTk5MjsxOTkxOzE5OTA7MTk4OTsxOTg4OzE5ODc7MTk4NjsxOTg1OzE5ODQ7MTk4MzsxOTgyOzE5ODE7MTk4MDsxOTc5OzE5Nzg7MTk3NzsxOTc2OzE5NzU7MTk3NDsxOTczOzE5NzI7MTk3MTsxOTcwOzE5Njk7MTk2ODsxOTY3OzE5NjY7MTk2NTsxOTY0OzE5NjM7MTk2MjsxOTYxOzE5NjA7MTk1OTsxOTU4OzE5NTc7MTk1NjsxOTU1OzE5NTQ7MTk1MzsxOTUyOzE5NTE7MTk1MDsxOTQ5OzE5NDg7MTk0NzsxOTQ2OzE5NDU7MTk0NDsxOTQzOzE5NDI7MTk0MTs+O0A8XDwtIFNlbGVjdCBZZWFyIC1cPjsyMDA1OzIwMDQ7MjAwMzsyMDAyOzIwMDE7MjAwMDsxOTk5OzE5OTg7MTk5NzsxOTk2OzE5OTU7MTk5NDsxOTkzOzE5OTI7MTk5MTsxOTkwOzE5ODk7MTk4ODsxOTg3OzE5ODY7MTk4NTsxOTg0OzE5ODM7MTk4MjsxOTgxOzE5ODA7MTk3OTsxOTc4OzE5Nzc7MTk3NjsxOTc1OzE5NzQ7MTk3MzsxOTcyOzE5NzE7MTk3MDsxOTY5OzE5Njg7MTk2NzsxOTY2OzE5NjU7MTk2NDsxOTYzOzE5NjI7MTk2MTsxOTYwOzE5NTk7MTk1ODsxOTU3OzE5NTY7MTk1NTsxOTU0OzE5NTM7MTk1MjsxOTUxOzE5NTA7MTk0OTsxOTQ4OzE5NDc7MTk0NjsxOTQ1OzE5NDQ7MTk0MzsxOTQyOzE5NDE7Pj47bDxpPDA+Oz4+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8Q29weXJpZ2h0IMKpIDIwMDQgSyZOIEVuZ2luZWVyaW5nLCBJbmMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuOz4+Oz47Oz47dDxAMDw7Ozs7Ozs7Oz47Oz47Pj47Pj47PqKxsHNxszJjYw+BBkFemweD8Alz" />
    
    <script language="javascript">
    <!--
    	function __doPostBack(eventTarget, eventArgument) {
    		var theform;
    		if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    			theform = document.forms["Form1"];
    		}
    		else {
    			theform = document.Form1;
    		}
    		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    		theform.__EVENTARGUMENT.value = eventArgument;
    		theform.submit();
    	}
    // -->
    </script>
    
    <select name="ddl_year" onchange="__doPostBack('ddl_year','')" language="javascript" id="ddl_year">
    	<option selected="selected" value="<- Select Year ->">&lt;- Select Year -&gt;</option>
    	<option value="2005">2005</option>
    
    	<option value="2004">2004</option>
    	<option value="2003">2003</option>
    	<option value="2002">2002</option>
    	<option value="2001">2001</option>
    	<option value="2000">2000</option>
    <select>
    </form>

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    berkeley
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Appsearch

    Would you recommend a certain site or book that would teach me about Page Controllers?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •