RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
HTML and I'm Stumped

0 Members and 2 Guests are viewing this topic.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
I need to maek a form for my company's website.
all dropdown lists.

<select><option> etc... is easy enough

but they want the dropdowns to disable until you select a previous one
and I need some way to actively check their values so it can spit out an answer in a text box lower on the page.

oh god x_x;;

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
I think the method is called 'auto populating', maybe that can help you search it better.

also it would be easier (fer ropette) if you went ahead and outlined the form.

--Drop Down 1
---Dog (if selected jump to Drop Down 3)
---Cat (if selected jump to Drop Down 2)

--Drop Down 2
---hair ball
---cats are gay

--Drop Down3
---Dogs rule
---Nightwolf eats dogs

and so on
and I dont think its only going to be HTML
Watch out for: HaloOfTheSun

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
me either.

it's like...

option 1 <selection options>
option 2 <selection options>
option 3 <selection options>
option 4 <selection options>
option 5 <selection options>
text box with results based on 1-5

and 2 needs to change based on 1 and 3 needs to change based on 2

x_x;;

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
( ´ิ(ꈊ) ´ิ) ((≡^⚲͜^≡)) (ી(΄◞ิ౪◟ิ‵)ʃ)
Rep:
Level 102
(っ˘ڡ˘ς) ʕ•̼͛͡•ʕ-̺͛͡•ʔ•̮͛͡•ʔ (*ꆤ.̫ꆤ*)
2014 Avast Ye Merry Pirate!2013 Avast Ye Merry Pirate Award2012 Avast Ye Merry Pirate AwardFor frequently finding and reporting spam and spam bots2011 Most Unsung Member2011 Avast Ye Merry Pirate2010 Avast Ye Merry Pirate Award
Use javascript and an onChange="YourCheckFunction()" to change the values.

Code: [Select]
<script language="Javascript">
function NAMformchange()
{
if(namform.IPrefer.value == "3")
{
//They changed the select to cocks, they must like penises
namform.ILike.value = "penises";
}
else if(namform.IPrefer.value == "0")
{
//No pref, empty it
namform.ILike.value = "";
}
}
</script>

<form name="namform" action="namckor.com/vulgar.php" method="post" enctype="application/x-www-form-urlencoded">
<select name="IPrefer" onChange="NAMformchange()">
<option value="0" selected>Nothing</option>
<option value="1">Butt</option>
<option value="2">Vagina</option>
<option value="3">Cocks</option>
</select>
<input name="ILike" type="text" value="" size="5" maxlength="50">
</form>

bringing sexy back

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
how about the changing the 2 and 3?
is there a function for adding selections that I could call on change?

edit: maybe onChange of 1-4 I could mess around and just re-write the HTML of the div that the form is in?
« Last Edit: February 11, 2009, 03:03:02 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
Watch out for: HaloOfTheSun

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
A Random Custom Title
Rep:
Level 96
wah
Tell him to piss off, then. :V

Anyways, I can still click the step 2 when I haven't done step 1 yet. D:

*
Resident Cloud
Rep:
Level 91
this is pretty sweet:
http://css-tricks.com/examples/SeminarRegTutorial/

yeah, too bad my boss hates cool stuff like that

thats in this months issue of .net magazine(practical web design for you americans) the developer guides you through creating it :D

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
this is pretty sweet:
http://css-tricks.com/examples/SeminarRegTutorial/

yeah, too bad my boss hates cool stuff like that

thats in this months issue of .net magazine(practical web design for you americans) the developer guides you through creating it :D

I know :D
Watch out for: HaloOfTheSun

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
long code is long
Code: [Select]
function formchange() {
if(Aspen_Selector.Manufacturer.value == "1") {
//----------------
//Chigo
//----------------
BTU = parseFloat(Aspen_Selector.BTU.value);
if(BTU == 9000) {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
Feet = parseFloat(Aspen_Selector.Feet.value);
if(Feet >= 0 && Feet <= 26) {
alert("ASP-ML-115");
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "12000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "18000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else if(Aspen_Selector.BTU.value == "24000") {
if(Aspen_Selector.Voltage.value == "1") {
if(Aspen_Selector.Installation.value == "1") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "49") {
} else {
}
} else if(Aspen_Selector.Installation.value == "2" || Aspen_Selector.Installation.value == "3") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "26") {
} else if(Aspen_Selector.Feet.value >= "27" && Aspen_Selector.Feet.value <= "65") {
} else {
}
} else if(Aspen_Selector.Installation.value == "4") {
if(Aspen_Selector.Feet.value >= "0" && Aspen_Selector.Feet.value <= "33") {
}
} else {
}
} else {
}
} else {
}
} else if(Aspen_Selector.Manufacturer.value == "2") {

} else if(Aspen_Selector.Manufacturer.value == "3") {

} else if(Aspen_Selector.Manufacturer.value == "4") {

} else if(Aspen_Selector.Manufacturer.value == "5") {

} else if(Aspen_Selector.Manufacturer.value == "6") {

}
}

there's the JS I'm working on for it.
here's the HTML

Code: [Select]
<form name="Aspen_Selector">
                                Manufacturer:
                                <select name="Manufacturer" onChange="formchange()">
                                    <option value="0"></option>
                                    <option value="1">Chigo</option>
                                </select>
                                <br />
                                <br />
                                BTU/Hr: <input type="text" name="BTU" size="14" onChange="formchange()"/>
                                <br />
                                <br />
                                Voltage:
                                <select name="Voltage" onChange="formchange()">
                                    <option value="0"></option>
                                    <option value="1">115v</option>
                                    <option value="2">230v</option>
                                    <option value="3">24v</option>
                                </select>
                                <br />
                                <br />
                                Installation Type:
                                <select name="Installation" onChange="formchange()">
                                    <option value="0"></option>
                                    <option value="1">Side Entry Surface w/elbow</option>
                                    <option value="2">Side Entry Eurface Straight</option>
                                    <option value="3">Rear Entry</option>
                                    <option value="4">Exposed Pump installation</option>
                                </select>
                                <br />
                                <br />
                                Feet off Head: <input type="text" name="Feet" size="14" onChange="formchange()"/>
                                <input type="button" value="Submit" onclick="formchange()" />
                            </form>

it's not working ;o;
what am I doing wrong?

if you were to select 'Chigo', 9000btu's, 115 volts, Side Entry Surface w/elbow Installation, and 0-26 feet off head, it shoud pop up an alert with "ASP-ML-115"

edit: it works in IE but not firefox?
« Last Edit: February 12, 2009, 05:11:37 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
I'm going to bump this because I still cant figure out what's wrong. :tpg:

edit: it's not the javascript, because all the rest of the site's javascript works fine.
        somehow it's the form, but roph's works fine, and I can't see what I'm doing different.
        other than using onclick of the button instead of onchange of the lists...which...
        doesn't work either.
« Last Edit: February 13, 2009, 03:10:20 PM by NAMKCOR »

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon