Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default combo box record list filtering-ASP


    guys anyone tried to create combobox list filtering using ASP.

    i have 2 combo box. cbosupplier and cbocontact. once the user select from cbosupplier list, cbocontact should also filter its list

  2. #2

    Default Re: combo box record list filtering-ASP

    ok ra na siya using javascript...

  3. #3

    Default Re: combo box record list filtering-ASP

    i was also thinking javascript.. hehe.. pro i dont know the capabilities of ASP man.. basin puydi diay asp?..

  4. #4

    Default Re: combo box record list filtering-ASP

    use javascript to post back the form..so inig select change (javascript) na event sa cbosupplier e post/submit nimo ang form..

  5. #5

    Default Re: combo box record list filtering-ASP

    poydi pud AJAX.. para di na kahinanglan i refresh ang page.

  6. #6

    Default Re: combo box record list filtering-ASP

    i tried javascript pro once magtawag ko sa
    naa man gud ko submit button pra pro ang gamit niya dre pra sa combo box.


  7. #7

    Default Re: combo box record list filtering-ASP

    you can use a hidden html tag for the action..let say if update lang ka sa imong combobox e fill nimo og value ang hidden like "UpdateCombo" then post the form..so then sa imong server side code you query the value of the hidden then if ang value kay UpdateCombo so update the combobox items if dili then it means a submit button was clicked ^_^. Or if you want para pro-ness kaayo imo design use AJAX...i prefer using AJAX in this scenario ^_^

  8. #8

    Default Re: combo box record list filtering-ASP

    pde sample app bro send lng j.bantang@gpzgroup.com

  9. #9

    Default Re: combo box record list filtering-ASP

    sorry i dont have enough time to create sample app for you...so here is a litte hint on how to do this using ajax...

    i call the frontend page as "testpage.asp" and "process.asp" as my main ajax gateway..

    testpage.asp - i ommited the html tags..i just focus on the javascript involve
    Code:
    //initialize ajax 
    <script language="javascript">
        //not so good xml request initialization..hehe im just tired.. ^_^
    	xmlHttp=GetXmlHttpObject()
    	if (xmlHttp==null)
    	{
    	   alert ("AJAX not supported!")
    	   return
    	} 
    </script>
    
    
    //so here is your onchange combobox
    <script language="javascript">
     function combo1OnChange()
    	{
            //you get the value of the selected combobox
    		var combo1ObjValue = document.getElementById("combo1").value
    		
            //construct the url, process.asp is where your request will be processed
    		var serverURL = "process.asp?id=" + combo1ObjValue //example process.asp?id=1
    		
            //send your constructed url using html request
    		xmlHttp.onreadystatechange = changeComboState      //changeComboState - is a callback function
    		xmlHttp.open("GET",serverURL,true)
    		xmlHttp.send(null)
    	}	
    
        //this is the callback function
    	function changeComboState()
    	{
    		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    		{ 
    			//if the request is completed you will have the result here...the results is  
                // in xmlHttp.responseText, so you can return any         
                //form of data may it XML, comma delimeted or etc...hehehe kaw na bahala..so if XML 
                //imo e return, parse the nodes then populate it to your other cmbox (eg. combo2)
                //using javascript.
    		}	
    	}
    </script>
    process.asp - this wil process ajax request you made in testpage.asp
    Code:
    <%
       id = request.querystring("id")
    
       //process id here..may it you query the database or what just return using response.write,
       //so if xml imo e return contruct the xml data then use response.write()...
    
    %>

    hehehe mobo ra kaayo bro..basically mao na iya structure if you are using ajax...heheeh cge tugpa sa ko..

    enjoy :mrgreen:

  10. #10

    Default Re: combo box record list filtering-ASP

    tnx bro. try ko working on the code zzz pro mas maayo kong naa sample samot na samok non kay mag XML na pud

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. For Sale: Nikon AF-S 35mm f1.8G DX w/ box,manual,uv Filter and reciept
    By Archbebz in forum Photography Equipment & Accessories
    Replies: 7
    Last Post: 07-26-2013, 04:09 PM
  2. Replies: 5
    Last Post: 06-24-2013, 11:39 PM
  3. Replies: 2
    Last Post: 06-16-2013, 01:35 PM
  4. For Sale: EHX HolyStain, EHX Nano Clone, DOD Milk Box, DOD envelope filter,
    By tanspik in forum Music & Movies
    Replies: 8
    Last Post: 08-18-2012, 06:03 PM
  5. For Sale: Combo box fitright + ultima-c
    By thechariot in forum Health & Beauty
    Replies: 12
    Last Post: 05-20-2009, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top