myfreeforum.org Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Who is OnlineWho is Online   Join! (free) Join! (free)  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
For an excellent guide to using your myfreeforum forum, you can visit
howtodoit
The howtodoit "readonly" forum provides answers and walkthroughs for all common questions.
  • Welcome
  • Guest


input box help!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    myfreeforum.org Forum Index -> Web page/template Editing
View previous topic :: View next topic  
Author Message
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 7:54 am    Post subject: input box help! Reply with quote

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" />&nbsp;&nbsp;<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
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 8:30 am    Post subject: Reply with quote

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
View user's profile Private message Send e-mail Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 9:07 am    Post subject: Reply with quote

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
View user's profile Private message
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 4:22 pm    Post subject: Reply with quote

that code doesn't work admin..
_________________
Click Here--> Cook Like a Pro in a Day!!!

Cook Like a Pro
Back to top
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 4:30 pm    Post subject: Reply with quote

It is only a code snippet showing techniques one would use in javaScript.

A full javascript program is needed.
_________________

Family Friendly Shareware | | Web Design/Services | Free Forums

forum.myfreeforum.org
Back to top
View user's profile Private message Send e-mail Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 4:34 pm    Post subject: Reply with quote

oh right would you be able to suggest a javascript programn I could use.
_________________
Click Here--> Cook Like a Pro in a Day!!!

Cook Like a Pro
Back to top
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 4:47 pm    Post subject: Reply with quote

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
View user's profile Private message Send e-mail Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 4:48 pm    Post subject: Reply with quote

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
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Tue Jun 17, 2008 5:16 pm    Post subject: Reply with quote

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
View user's profile Private message Send e-mail Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 4:58 pm    Post subject: Reply with quote

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
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 5:15 pm    Post subject: Reply with quote

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
View user's profile Private message Send e-mail Visit poster's website
Symon
Moderator
Moderator

Virtual Cash: 27800

Joined: 04 Sep 2005
Posts: 11066
Location: Hampshire,England
Add Karma

rated by 84 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 6:29 pm    Post subject: Reply with quote

http://www.w3schools.com/JS/js_examples_3.asp
_________________


http://www.saynoto0870.com/

XXVIII/ I/ MCMLXXI
Back to top
View user's profile Private message Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 6:34 pm    Post subject: Reply with quote

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
View user's profile Private message
admin (no pm's please)
Site Admin
Site Admin

Virtual Cash: 42980

Joined: 22 May 2005
Posts: 19355

Add Karma

rated by 157 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 8:27 pm    Post subject: Reply with quote

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
View user's profile Private message Send e-mail Visit poster's website
wee2john
Apprentice
Apprentice

Virtual Cash: 1110

Joined: 04 Sep 2007
Posts: 148
Location: Northern Ireland
Add Karma

rated by 2 members
Add Comment
Show Comments

online/offline
PostPosted: Wed Jun 18, 2008 9:12 pm    Post subject: Reply with quote

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
View user's profile Private message
Display posts from previous:   
Post new topic   Reply to topic    myfreeforum.org Forum Index -> Web page/template Editing All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2
 
 
Jump to:  
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

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum