www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] How to associate 2 actions with onSubmit.

  1. #1
    Join Date
    Mar 2009
    Posts
    54

    resolved [RESOLVED] How to associate 2 actions with onSubmit.

    Hello,

    I have a form containing dropdown and a button. The button calls a new application in a new page passing the drop down selection as URL parameter to the application.

    I have to set this drop down selection as cookie on the browser.

    I am able to call the application just fine. But the cookie is not getting set. Any ideas are appreciated.

    Here is the code for form

    Code:
    <div id="narrow">
    
    <form method="POST" action="/irj/portal/orderstatus" onsubmit = "top.location.href=this.action+'&DynamicParameter=searchText%3D'+this.searchText.value+'%26searchFilter%3D'+this.searchFilter.options[this.searchFilter.selectedIndex].value; return false;" id="orderstatus">
    	<fieldset>
    
        <legend>Quick Search: Order Status</legend>
    
            <div class="search"><input name="searchText" type="text" class="searchbox"> <input type="submit" name="imageField" value="Go" class="button "></div>
    		
    		<select name="searchFilter" class="searchlist">
    		<option value="SalesOrder">Sales Order #</option>
    		<option value="JobName">Job Name</option>
    		<option value="SalesPerson">Sales Person</option>
    		<option value="PO">Purchase Order #</option>
    		<option value="OrderStatus">Order Status</option>
    		<option value="BillTo">Bill To</option>
    		<option value="ShipTo">Ship To</option>
    		<option value="Material">Material</option>
    		</select>
           	</fieldset>
    </form>
    </div>

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    Try using a function?
    Code:
    function your_function(){
    //stuff your function does
    //functions can have multiple lines
    //and thus multiple things can be done
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles