DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Vey hard problem.. no idea how to solve ??? (http://www.daniweb.com/forums/thread62822.html)

spike29 Nov 26th, 2006 4:34 pm
Vey hard problem.. no idea how to solve ???
 
Q: write a XHTML document that shows the reasult of the color survey. The document should contain a form with radio buttons that allows users to vote for their favorite color. one of the colors should be selected as a default. Then document should also contain a table showing various colors and the corresponding percentages of votes for each color. (Eeach row should be displayed in the color to which it is referring. ) Use attributes to format width, border and cell spacing for the table.

But I can't use javaScript or PHP. only CSS :sad: :?: help!!!!!

vishesh Nov 26th, 2006 5:09 pm
Re: Vey hard problem.. no idea how to solve ???
 
Quote:

Originally Posted by spike29 (Post 280856)
Q: write a XHTML document that shows the reasult of the color survey. The document should contain a form with radio buttons that allows users to vote for their favorite color. one of the colors should be selected as a default. Then document should also contain a table showing various colors and the corresponding percentages of votes for each color. (Eeach row should be displayed in the color to which it is referring. ) Use attributes to format width, border and cell spacing for the table.

But I can't use javaScript or PHP. only CSS :sad: :?: help!!!!!

this is practically not possible...how could you do that with CSS and HTML....they aint scripting languages..they just tell browser how the page and elements should look

spike29 Nov 26th, 2006 5:24 pm
Re: Vey hard problem.. no idea how to solve ???
 
Quote:

Originally Posted by vishesh (Post 280876)
this is practically not possible...how could you do that with CSS and HTML....they aint scripting languages..they just tell browser how the page and elements should look





Oh!! ok.. meh welll then how could I do it using Javascript then?

vishesh Nov 26th, 2006 5:42 pm
Re: Vey hard problem.. no idea how to solve ???
 
you could do that with javascript, however whatever the user has voted will be stored until the page is opened. once the page is closed everything vanishes...since javascript is not supposed to write files into hard-drives. However you could use cookies...the data will be stored in it. But in both cases the result will be shown of that particular user who is opening that page i mean depending only upon the number of times only he has voted.

so for such purpose server-side scripts such as PHP, ASP etc.. are recommended which could save data from every users.

but i suppose the question assumes that you need to use javascript

katarey Nov 26th, 2006 5:57 pm
Re: Vey hard problem.. no idea how to solve ???
 
for layout you can use CSS, and for vote function you will need to use php with mySQL or asp with MS Acces (server-side scripts with database)

spike29 Nov 26th, 2006 6:09 pm
Re: Vey hard problem.. no idea how to solve ???
 
oh.. am going to do that thx

vishesh Nov 26th, 2006 6:16 pm
Re: Vey hard problem.. no idea how to solve ???
 
then you need to learn server side script and SQl. i recommend PHP.

MattEvans Nov 27th, 2006 4:27 pm
Re: Vey hard problem.. no idea how to solve ???
 
SQL for a single vote! :|

Use a single text file, or a text file for each color.

You could do that in PHP, Perl, ASP, etc. But definately: no way without some script sitting on your server.

Is this like, a school/college/university question? If so, they're certainly raising the bar O_O

spike29 Dec 13th, 2006 10:17 pm
Re: Vey hard problem.. no idea how to solve ???
 
How could I do this with javascript?

vishesh Dec 14th, 2006 4:40 am
Re: Vey hard problem.. no idea how to solve ???
 
I think you need to learn JavaScript.

Do you know JavaScript?


All times are GMT -4. The time now is 11:32 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC