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: Tue Jun 17, 2008 7:54 am Post subject: input box help! |
|
|
ok here is my problem. I want my cooking forum to have a input box like below when you type in how many people you want it to serve and then it changes the amount of ingredients you need:
An Example HERE!!!
Try it out and see what i mean!! I want this to be in my posting area and in when viewing the topic. Thanks!
Oh yeah and here is the code:
| Code: | | <div class="servings"><input type="text" name="scale" size="1" value="6" /> <input type="hidden" name="mid" value="63990" /><input class="button" type="submit" value="change servings" /> <input type="button" class="button" onclick="location.href = 'http://www.cdkitchen.com/recipes/recs/39/All-Time-Favorite-Puff-Pudding93117.shtml'" value="reset" /></div></form><p><span class="bold red">Ingredients:</span><br /><span style="font-family:arial;" id="nointelliTXT">"ingredients here"</span> |
_________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Tue Jun 17, 2008 8:30 am Post subject: |
|
|
That would be easy in javascript, give all ingredients a special class or id, then you the onchange event in javascript to alter those fields.
| Code: |
function getElementsByClassName(needle) {
var my_array = document.getElementsByTagName("*");
var retvalue = new Array();
var i;
var j;
for (i=0,j=0;i<my_array.length;i++) {
var c = " " + my_array[i].className + " ";
if (c.indexOf(" " + needle + " ") != -1) retvalue[j++] = my_array[i];
}
return retvalue;
}
|
| Code: |
tests = getElementsByClassName("runningman");
pos = p*2;
for (i= 0; i < tests.length; i++)
{
tests[i].style.left = pos +"px";
}
|
are snippets of how to do bits of this. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| 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: Tue Jun 17, 2008 9:07 am Post subject: |
|
|
sorry i am lost.
Dont want to be annoying but what is the full code and where, what do I do with it??? _________________ 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
 |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
|
| 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
 |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Tue Jun 17, 2008 4:47 pm Post subject: |
|
|
The thing about programs is that with few exceptions they need to be written to fill the need, they are not just available off the shelf.
What you are asking for is maybe 2 hours work for a javascript programmer, well less than that for a good one, but it would need installing etc. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| 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: Tue Jun 17, 2008 4:48 pm Post subject: |
|
|
well then how doi do what I want for my forum (changing servings - as mentioned above) _________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Tue Jun 17, 2008 5:16 pm Post subject: |
|
|
How do you program without programming? What is the sound of one hand clapping?
If you need programming done, you are going to have to:
1) Learn programming.
2) Find a forum member prepared to do it for you.
3) Offer to pay a programmer.
Not every bit of customization can be done with a portal check box option. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| 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: Wed Jun 18, 2008 4:58 pm Post subject: |
|
|
do you know wnyone who could do it. I have searched and searched but can't find anything to help me do it my self. _________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Wed Jun 18, 2008 5:15 pm Post subject: |
|
|
Can do it? or would do it for free?
There may be students on this forum who are learning javascript and would therefore probably charge pocket money rates for a little job where they would learn something. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| Back to top |
|
 |
Symon Moderator

 Virtual Cash: 27800
Joined: 04 Sep 2005 Posts: 11066 Location: Hampshire,England Add Karma
 rated by 84 members
Add Comment
Show Comments
 |
|
| 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: Wed Jun 18, 2008 6:34 pm Post subject: |
|
|
I really hoped it could be done for free. I myself am only 15 so don't have a lot of money.
EDIT: What am I meant to be looking for symon? _________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |
admin (no pm's please) Site Admin

 Virtual Cash: 42980
Joined: 22 May 2005 Posts: 19355
Add Karma
 rated by 157 members
Add Comment
Show Comments
 |
Posted: Wed Jun 18, 2008 8:27 pm Post subject: |
|
|
I think Symon is just posting a tutorial.
You have to be real here. Life in the real world of web sites is not free. People will not build you a programmed site for nothing unless they are a member of your site and keen to do it, or want the experience. _________________
Family Friendly Shareware | | Web Design/Services | Free Forums
forum.myfreeforum.org |
|
| 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: Wed Jun 18, 2008 9:12 pm Post subject: |
|
|
I realise that. I have a member on another javascript forum helping me at the moment. He has got everything sorted pretty much apart from one problem.
I was just wondering how to put a .js file or javascript code onto a forum.
I will post the code for the javasript once it is finished. _________________ Click Here--> Cook Like a Pro in a Day!!!
Cook Like a Pro |
|
| Back to top |
|
 |