We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Questions...
Topic Started: Jun 28 2005, 05:55 AM (386 Views)
RenaH
Member Avatar
Product Might Contain Lame
[ *  *  *  *  *  * ]
I'm kind of a newb at coding :r

But here are my questions:

1) How can I get a button to change the contents of a textbox or label?

eg: The label starts at 0, when a button is pressed it adds 1 to the value.

2) How can I restrict the same IP from making a change to the field for a certian amount of time.

eg: 127.0.0.1 has made a change to the field once and I want to prevent the same IP from making a change fo a week.

3) Would you use Javascript for the above?

Thanks.
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
For the first you could use both JavaScript and PHP, I think.
The second would be done in PHP.

I can take a go at the second if you want.
Offline Profile Quote Post Goto Top
 
RenaH
Member Avatar
Product Might Contain Lame
[ *  *  *  *  *  * ]
Hum, sure why not, I kind of guessed it wouldn't be Javascript :P

What functions would I need for the first one?
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
Ok, I hope this will do.

(Just rename to whatever_you_want.php)

Offline Profile Quote Post Goto Top
 
RenaH
Member Avatar
Product Might Contain Lame
[ *  *  *  *  *  * ]
Looks confusing, lol, thanks :P

Where is says "Your Code Here", could that be Javascript? Or does it have to be PHP?
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
Well, it should be PHP, as JS wouldn't cause the page to reload.
If you want the script of question 1 in there, I can edit it to include something that does that if you want.
Offline Profile Quote Post Goto Top
 
RenaH
Member Avatar
Product Might Contain Lame
[ *  *  *  *  *  * ]
That would be cool :P
Offline Profile Quote Post Goto Top
 
overulehost
Member
[ * ]
just do a search at hotscripts.com for that snippet of code
Offline Profile Quote Post Goto Top
 
RenaH
Member Avatar
Product Might Contain Lame
[ *  *  *  *  *  * ]
True but code sites give me a headache, can't find things properly >.>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply