User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 329,731 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,536 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1878 | Replies: 13
Reply
Join Date: Nov 2006
Posts: 11
Reputation: spike29 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
spike29 spike29 is offline Offline
Newbie Poster

Vey hard problem.. no idea how to solve ???

  #1  
Nov 26th, 2006
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 help!!!!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: India
Posts: 1,267
Reputation: vishesh is on a distinguished road 
Rep Power: 4
Solved Threads: 29
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

Re: Vey hard problem.. no idea how to solve ???

  #2  
Nov 26th, 2006
Originally Posted by spike29 View Post
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 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
Reply With Quote  
Join Date: Nov 2006
Posts: 11
Reputation: spike29 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
spike29 spike29 is offline Offline
Newbie Poster

Re: Vey hard problem.. no idea how to solve ???

  #3  
Nov 26th, 2006
Originally Posted by vishesh View Post
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?
Reply With Quote  
Join Date: Oct 2006
Location: India
Posts: 1,267
Reputation: vishesh is on a distinguished road 
Rep Power: 4
Solved Threads: 29
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

Re: Vey hard problem.. no idea how to solve ???

  #4  
Nov 26th, 2006
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
Reply With Quote  
Join Date: Jul 2005
Location: india
Posts: 143
Reputation: katarey is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
katarey's Avatar
katarey katarey is offline Offline
Junior Poster

Re: Vey hard problem.. no idea how to solve ???

  #5  
Nov 26th, 2006
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)
Last edited by katarey : Nov 26th, 2006 at 5:58 pm.
Freelance Web Designer & Developer
Http//www.Katarey.com
Reply With Quote  
Join Date: Nov 2006
Posts: 11
Reputation: spike29 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
spike29 spike29 is offline Offline
Newbie Poster

Re: Vey hard problem.. no idea how to solve ???

  #6  
Nov 26th, 2006
oh.. am going to do that thx
Reply With Quote  
Join Date: Oct 2006
Location: India
Posts: 1,267
Reputation: vishesh is on a distinguished road 
Rep Power: 4
Solved Threads: 29
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

Re: Vey hard problem.. no idea how to solve ???

  #7  
Nov 26th, 2006
then you need to learn server side script and SQl. i recommend PHP.
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 899
Reputation: MattEvans will become famous soon enough MattEvans will become famous soon enough 
Rep Power: 4
Solved Threads: 43
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Practically a Posting Shark

Re: Vey hard problem.. no idea how to solve ???

  #8  
Nov 27th, 2006
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
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Join Date: Nov 2006
Posts: 11
Reputation: spike29 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
spike29 spike29 is offline Offline
Newbie Poster

Re: Vey hard problem.. no idea how to solve ???

  #9  
Dec 13th, 2006
How could I do this with javascript?
Reply With Quote  
Join Date: Oct 2006
Location: India
Posts: 1,267
Reputation: vishesh is on a distinguished road 
Rep Power: 4
Solved Threads: 29
vishesh's Avatar
vishesh vishesh is offline Offline
Nearly a Posting Virtuoso

Re: Vey hard problem.. no idea how to solve ???

  #10  
Dec 14th, 2006
I think you need to learn JavaScript.

Do you know JavaScript?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 3:39 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC