This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 07 Nov 2007 03:35:26 pm    Post subject:

I have yet to learn enough from javascript to know if the following is possible. I want to making a poll from nothing but pictures and no radio buttons or check boxes. So a user would click on a picture to vote. Is it possible to use javascript to handle the mouseover, mouseclick, and other stuff for visual effects and php for storing the votes once a picture is clicked?
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 07 Nov 2007 05:18:51 pm    Post subject:

keep an array of boolean values, and have each img element have an id="#" corresponding to the index in the array.


then have an onClick handler that gets the id of the img that called it, and use that to modify the necessary array element.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 07 Nov 2007 05:22:11 pm    Post subject:

I've heard that it's not possible to make a poll in Javascript that can store the results of the poll to recall it later. After adjusting the array how would I if it's possible use PHP to access the array to store the results?, or am I in the wrong direction?

Last edited by Guest on 07 Nov 2007 05:24:01 pm; edited 1 time in total
Back to top
Demon


Advanced Member


Joined: 17 Jun 2006
Posts: 369

Posted: 07 Nov 2007 07:47:11 pm    Post subject:

Newbie wrote:
Is it possible to use Javascript to handle the mouseover, mouseclick, and other stuff for visual effects...?
[post="115622"]<{POST_SNAPBACK}>[/post]

You could use CSS for that.


Newbie wrote:
...And PHP for storing the votes once a picture is clicked?
[post="115622"]<{POST_SNAPBACK}>[/post]


You could store the results into an SQL table or tab-delimited in a flat file or something.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 10 Nov 2007 03:30:11 pm    Post subject:

Demon wrote:
Newbie wrote:
Is it possible to use Javascript to handle the mouseover, mouseclick, and other stuff for visual effects...?
[post="115622"]<{POST_SNAPBACK}>[/post]

You could use CSS for that.

CSS is better for visual effects, use Javascript to handle the poll itself.

Newbie wrote:
...And PHP for storing the votes once a picture is clicked?
[post="115622"]<{POST_SNAPBACK}>[/post]

yes.

Demon wrote:
You could store the results into an SQL table or tab-delimited in a flat file or something.
[post="115649"]<{POST_SNAPBACK}>[/post]

SQL table is preferable, .csv (Comma Separated Values) works fine too.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement