jquery variable in php roepen
Ik maak gebruik van een smart wizard form om door bepaalde stappen heen te lopen:
1-Kies category
2-Kies subcategory
3-
4-Betaling
Wanneer ik in stap-1 category selecteer (radio button's) en vervolgens next klik moet in stap twee de subcategorieen naar voren komen.
Het probleem is dat ik de value van de geselecteerde category niet in stap twee kan gebruiken om vervolgens de juiste subcategorieen te roepen.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<form action="#" method="POST">
<input type='hidden' name="issubmit" value="1">
<!-- Tabs -->
<div id="wizard" class="swMain">
<ul>
<li><a href="#step-1">
<label class="stepNumber">1</label>
</a></li>
<li><a href="#step-2">
<label class="stepNumber">2</label>
<
</span>
</a></li>
<li><a href="#step-3">
<label class="stepNumber">3</label>
</span>
</a></li>
<li><a href="#step-4">
<label class="stepNumber">4</label>
</span>
</a></li>
</ul>
<div id="step-1">
<h2 class="StepTitle">Step 1: Category</h2>
<fieldset>
<legend>Choose category</legend>
<?php foreach($categories as $category) {?>
<ul class="radiolist">
<li>
<input name="jqdemo" value="<?php echo $category['name'];?>" type="radio" id="choice_a"/>
<label for="choice_a"><?php echo $category['name'];?></label>
<a class="radio-select" href="">Select</a>
<a class="radio-deselect" href="">Cancel</a>
</li>
</ul>
<?php }?>
</fieldset>
</div>
<div id="step-2">
<h2 class="StepTitle">Step 2: Profile Details</h2>
</div>
<input type='hidden' name="issubmit" value="1">
<!-- Tabs -->
<div id="wizard" class="swMain">
<ul>
<li><a href="#step-1">
<label class="stepNumber">1</label>
</a></li>
<li><a href="#step-2">
<label class="stepNumber">2</label>
<
</span>
</a></li>
<li><a href="#step-3">
<label class="stepNumber">3</label>
</span>
</a></li>
<li><a href="#step-4">
<label class="stepNumber">4</label>
</span>
</a></li>
</ul>
<div id="step-1">
<h2 class="StepTitle">Step 1: Category</h2>
<fieldset>
<legend>Choose category</legend>
<?php foreach($categories as $category) {?>
<ul class="radiolist">
<li>
<input name="jqdemo" value="<?php echo $category['name'];?>" type="radio" id="choice_a"/>
<label for="choice_a"><?php echo $category['name'];?></label>
<a class="radio-select" href="">Select</a>
<a class="radio-deselect" href="">Cancel</a>
</li>
</ul>
<?php }?>
</fieldset>
</div>
<div id="step-2">
<h2 class="StepTitle">Step 2: Profile Details</h2>
</div>
Gewijzigd op 09/10/2013 14:24:55 door A elb
Er zijn nog geen reacties op dit bericht.