Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Multiple Drop Down Menus W/ Submit Button


13 replies to this topic

#11 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 28 December 2009 - 05:50 PM

Cannot modify header information Multiple Drop Down Menus W/ Submit Button

sportytalk,

I copied your code into Dreamweaver CS4, saved the file as "yourfile.Php", then uploaded it to my server.  When I visit the page in a web browser (IE8 or Firefox) and hit the SUBMIT button, I get an error that reads:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/x/y/z/xyz/html/yourfile.Php:8) in /home/content/x/y/z/xyz/html/yourfile.Php on line 15 

Doing some research, I've seen others claim that there might be whitespace before or after the

<?php . . . ?>, but I can't find any blanks.



#12 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 06 February 2010 - 06:40 AM

multiple dropdown boxesMultiple Drop Down Menus W/ Submit Button

I just want to create a webpage, that it appears only a single dropdown box with multiple options in that box, when we selected item1, an another dropdown box has to appear, which will contain some more subitems, if we selected subitem1 here one more drop down box has to appear here, like this and if there is no subitem to that specified item, I want to just open a link on new window, while doing this the parent dropdownbox will still remain, it should not be disappear

 

Please any one Help me To Create This Code, I tried so much but I am not getting any I don't know any programming so please help for this, please send me some mail if any one got the solution

-reply by help

#13 Guest_Surya R Praveen_*

  • Guests

Posted 02 December 2011 - 12:50 PM


<script>
function show(){
var ty= window.document.getElementById('type');
var ri= window.document.getElementById('risk');
var ho= window.document.getElementById('holding');
var ca= window.document.getElementById('capital');

var tysel= ty.options[ty.selectedIndex].value;
var risel= ri.options[ri.selectedIndex].value;
var hosel= ho.options[ho.selectedIndex].value;
var casel= ca.options[ca.selectedIndex].value;

if(tysel=="Investor" && risel=="Low" && hosel=="G36" && casel=="B25"){
document.getElementById('text').style.visibility = 'visible';
alert("Hello! I am an alert box!");
}
else{
document.getElementById('text').style.visibility = 'hidden';
}
}
</script>

<form id="form1" name="form1" method="post" action="">
<label class="llabel">Type</label> : <select name="type" class="forms" id="type">
<option value="Investor">Investor</option>
<option value="Trader">Trader</option>
<option value="Both">Both</option>
<option value="None">None</option></select>
<br>
<label class="llabel">Age</label> : <select name="age" class="forms" id="age">
<option value="25">Below 25 years</option>
<option value="2540">Between 25-40 Years</option>
<option value="4055">Between 40-55 Years</option>
<option value="55">Above 55 Years</option>
</select><br>
<label class="llabel">Profession</label> : <select name="prof" class="forms" id="prof">
<option value="Self">Self Employed</option>
<option value="Job">Job</option>
<option value="Business">Business</option>
<option value="Investorpro">Investor</option>
</select>
<br>
<label class="llabel">Risk Profile</label> : <select name="risk" class="forms" id="risk">
<option value="Low">Low</option>
<option value="Medium">Medium</option>
<option value="High">High</option>
<option value="VHigh">Very High</option>
</select>
<br>
<label class="llabel">Knowledge</label> : <select name="select" class="forms">
<option value="Novice">Novice</option>
<option value="Basic">Basic Understanding</option>
<option value="Good">Good Understanding</option>
<option value="Specialist">Specialist</option>
</select>
<br>
<label class="llabel">Risk Capital</label> : <select name="capital" class="forms" id="capital">
<option value="B2">Below 2 Lacs</option>
<option value="B25">Between 2-5 Lacs</option>
<option value="B510">Between 5-10 Lacs</option>
<option value="G10">Greater than 10 Lacs</option>
</select>
<br>
<label class="llabel">Holding Period</label> : <select name="holding" class="forms" id="holding">
<option value="B12">Between 1-2 months</option>
<option value="B612">Between 6-12 months</option>
<option value="B1236">Between 12-36 months</option>
<option value="G36">Greater than 36 months</option>
</select>
<br>
<label class="llabel">Expected Returns</label> : <select name="select" class="forms">
<option value="35">35% per year</option>
<option value="55">55% per year</option>
<option value="75">75% per year</option>
<option value="100">100% per year</option>
</select>
<br><br>
<div align="center">
<input type="button" value="Submit" name="Submit" onclick="return show();">&nbsp;&nbsp;
<input type="button" value="Reset" name="Reset">&nbsp;&nbsp;
<input type="text" id="text" style="visibility:hidden">
</div>
</form>

[/CODE]
Just copy the code and enjoy,

Regards

Surya R Praveen
Senior Web Developer

#14 Guest_Surya R Praveen_*

  • Guests

Posted 03 December 2011 - 05:58 AM

<code>

<script>

/* Multiple Drop Down Surya R Praveen */

function show(){

var ty= window.document.getElementById('type');

var ri= window.document.getElementById('risk');

var ho= window.document.getElementById('holding');

var ca= window.document.getElementById('capital');

var ag= window.document.getElementById('age');



var tysel= ty.options[ty.selectedIndex].value;

var risel= ri.options[ri.selectedIndex].value;

var hosel= ho.options[ho.selectedIndex].value;

var casel= ca.options[ca.selectedIndex].value;

var agsel= ag.options[ag.selectedIndex].value;



if(tysel=="Investor" && risel=="Low" && hosel=="G36" && casel=="B25"){

window.location = "http://suryarpraveen.wordpress.com/contact/";

}

else if(tysel=="Investor" && risel=="Low" && agsel=="2540" && casel=="B25"){

window.location = "http://suryarpraveen.wordpress.com/category/computing/";

}

else if(tysel=="Investor" && risel=="Medium" && agsel=="2540" && casel=="B25"){

window.location = "http://suryarpraveen.wordpress.com/category/electronics/";

}

else if(tysel=="Investor" && risel=="High" && agsel=="2540" && casel=="B25"){

window.location = "http://suryarpraveen.wordpress.com/category/gaming/";

}

else if(tysel=="Investor" && risel=="VHigh" && agsel=="2540" && casel=="B25"){

window.location = "http://suryarpraveen.wordpress.com/category/internet/";

}

else if(tysel=="Trader"){

window.location = "http://suryarpraveen.wordpress.com/category/mobile/";

}

}

</script>



<form id="form1" name="form1" method="post" action="">

  <label class="llabel">Type</label> : <select name="type" class="forms" id="type">

<option value="Investor">Investor</option>

<option value="Trader">Trader</option>

<option value="Both">Both</option>

<option value="None">None</option></select>

<br>

  <label class="llabel">Age</label> : <select name="age" class="forms" id="age">

<option value="25">Below 25 years</option>

<option value="2540">Between 25-40 Years</option>

<option value="4055">Between 40-55 Years</option>

<option value="55">Above 55 Years</option>

</select><br>

<label class="llabel">Profession</label> : <select name="prof" class="forms" id="prof">

<option value="Self">Self Employed</option>

<option value="Job">Job</option>

<option value="Business">Business</option>

<option value="Investorpro">Investor</option>

</select>

<br>

<label class="llabel">Risk Profile</label> : <select name="risk" class="forms" id="risk">

<option value="Low">Low</option>

<option value="Medium">Medium</option>

<option value="High">High</option>

<option value="VHigh">Very High</option>

</select>

<br>

<label class="llabel">Knowledge</label> : <select name="select" class="forms">

<option value="Novice">Novice</option>

<option value="Basic">Basic Understanding</option>

<option value="Good">Good Understanding</option>

<option value="Specialist">Specialist</option>

</select>

<br>

<label class="llabel">Risk Capital</label> : <select name="capital" class="forms" id="capital">

<option value="B2">Below 2 Lacs</option>

<option value="B25">Between 2-5 Lacs</option>

<option value="B510">Between 5-10 Lacs</option>

<option value="G10">Greater than 10 Lacs</option>

</select>

<br>

<label class="llabel">Holding Period</label> : <select name="holding" class="forms" id="holding">

<option value="B12">Between 1-2 months</option>

<option value="B612">Between 6-12 months</option>

<option value="B1236">Between 12-36 months</option>

<option value="G36">Greater than 36 months</option>

</select>

<br>

<label class="llabel">Expected Returns</label> : <select name="select" class="forms">

<option value="35">35% per year</option>

<option value="55">55% per year</option>

<option value="75">75% per year</option>

<option value="100">100% per year</option>

</select>

<br><br>

<div align="center">

<input type="button" value="Submit" name="Submit" onclick="return show();">&nbsp;&nbsp;

	<input type="button" value="Reset" name="Reset">&nbsp;&nbsp;

<input type="text" id="text" style="visibility:hidden">

</div>

</form>
</code>





Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users