|
|
| View previous topic :: View next topic |
| Author |
Message |
wee2john Apprentice

Virtual Cash: 1110
Joined: 04 Sep 2007 Posts: 148 Location: Northern Ireland Add Karma
 rated by 2 members
Add Comment
Show Comments
 |
Posted: Thu Jun 19, 2008 7:56 am Post subject: |
|
|
I have a problem here is the code:
| Code: | <script type="text/javascript">
function changeingre(num){
for(i=0;i<=3;i++)
document.getElementById("ingredient_"+i).innerText=num+"";
}
</script>
<div class="servings"><input type="text" name="scale" size="1" value="1" /> <input type="hidden" name="mid" value="63990" /><input type="button" class="button" value="change servings" onclick=changeingre(num)(document.all('scale').value) /></div>
<div><span id="ingredient_1">1</span>g sugar</div>
<div><span id="ingredient_2">1</span>g flour</div>
<div><span id="ingredient_3">1</span>tbsp butter</div> |
This is the only part that the guy doing it doesn't understand.
Everything shows but when you click change servings button it doesn't respond.
_________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
wee2john Apprentice

Virtual Cash: 1110
Joined: 04 Sep 2007 Posts: 148 Location: Northern Ireland Add Karma
 rated by 2 members
Add Comment
Show Comments
 |
Posted: Sun Jun 22, 2008 3:23 pm Post subject: |
|
|
I have the answer for changing the servings with fractions (not deciamls):
The code was:
_________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|