Hi guys!
I have a four step html form that i have coded but what i need to try and figure out is the following:
I have a basic unordered list menu at the top of the page:
<ul>
<li>STEP 1:</li>
<li>STEP 2:</li>
<li>STEP 3:</li>
<li>STEP 4:</li>
</ul>
and what i want to happen is when the user is on "Step 1" the list item should be a certain css class so that the user know they are now on step 1 of 4 and then as they move on through the form that particular css class moves through the unordered list.
Hope the above makes sense, please help!
Javascript Help
-
- Resident Drama Llama
- Posts: 967
- Joined: 05 Mar 2008, 02:00
- Contact:
Re: Javascript Help
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
........................................................................................................................................................................................................
Last edited by -Prometheus- on 04 Apr 2011, 04:25, edited 1 time in total.
-
- Registered User
- Posts: 2663
- Joined: 29 Jul 2004, 02:00
- Location: hidden deep in the depths of the underworld is my home.
- Contact:
Re: Javascript Help
hmmm. need more info...
you will need to give each li an id
eg.
then you call it
very roughly done.
you will need to give each li an id
eg.
Code: Select all
<li id="li1">STEP 1:</li>
Code: Select all
<script language="javascript">
function test(){
document.formname.li1.class = "classname";
}
</script>