here i have small issue. pls sort it out 4 me soon n be thankful 4 u

<div id="div1">
  <input type="radio" name="radio" id="radio" value="150" onclick="return displayCost(this.value);" />
</div>
<div id="div2">
  <select name="select2" size="1" id="select2"  onchange="return calculateCost(this.value);">
                        <option>1</option>
                        <option>2</option>
                        <option>3</option>
                        <option>4</option>
                        </select>Pages
</div>

here there is no submit button or form. Actually am calling 2 functions for two divs.Its fine even if one function is used by u.
But what i required here is , i should pass both div values ie., dropdown value and radio button value in to a single function. so how to get this two values .

here i have small issue. pls sort it out 4 me soon n be thankful 4 u

<div id="div1">
  <input type="radio" name="radio" id="radio" value="150" onclick="return displayCost(this.value);" />
</div>
<div id="div2">
  <select name="select2" size="1" id="select2"  onchange="return calculateCost(this.value);">
                        <option>1</option>
                        <option>2</option>
                        <option>3</option>
                        <option>4</option>
                        </select>Pages
</div>

here there is no submit button or form. Actually am calling 2 functions for two divs.Its fine even if one function is used by u.
But what i required here is , i should pass both div values ie., dropdown value and radio button value in to a single function. so how to get this two values .

dont pass any parameter to your calculateCost() function. in the function get the values using document.getElementById("elementID").value and set them to your variables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.