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 402,003 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 2,455 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: 2101 | 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

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

  #11  
Dec 14th, 2006
oK this is what I have been able to do. Can you tell me how to make one of the color as the defult select and how to make the bard for each % (would I just need to creat a image and import it for each)?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>



</head>


<table width='100%' cellpadding=0 cellspacing=4 border=0>
<td><table width=100 cellspacing=0 cellpadding=0 border=0 align=left bgcolor='#001894'><tr><td>
<table width=266 height="243" border=0 cellpadding=0 cellspacing=1>
<tr><td><font color='#FFFFFF' face='verdana,arial' size=1><b>&nbsp;color</b></font></td><td width="81"><font color='#FFFFFF' face='verdana,arial' size=1>&nbsp;<b>%</b></font></td></tr>
<tr bgcolor='#FFFFFF'><td width=111><form name="form1" method="post" action="">
<input name="radiobutton" type="radio" value="radiobutton">
Blue
</form></td>
<td nowrap><font face='verdana,arial' size=1>&nbsp;10%</font></td></tr>
<tr bgcolor='#FFFFFF'><td width=111>
<form name="form2" method="post" action="">
<input name="radiobutton" type="radio" value="radiobutton">
Red
</form></td><td><font face='verdana,arial' size=1>&nbsp;10%</font></td></tr>
<tr bgcolor='#FFFFFF'><td width=111>
<form name="form3" method="post" action="">
<input name="radiobutton" type="radio" value="radiobutton">
Violet
</form></td><td><font face='verdana,arial' size=1>&nbsp;30%</font></td></tr>
<tr bgcolor='#FFFFFF'><td width=111><form name="form4" method="post" action="">
<input name="radiobutton" type="radio" value="radiobutton">
Green
</form></td>
<td><font face='verdana,arial' size=1>&nbsp;50%&nbsp;</font></td></tr></table>
</td></tr></table>
</td></tr></table>
</span></TD>
</TR>
</TABLE>

</TABLE>
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 943
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 47
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

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

  #12  
Dec 14th, 2006
that doesn't look like good HTML...elements like "html" and "head" need to contain some data.... you're missing a body (which isn't neccessarily 'wrong', but it's good practice to have one).. and this indicates an illegal construct somewhere :

</TABLE>

</TABLE>

it's never possible to close one table and then another straight away... there's gotta be a cell and a row and preferably a tbody element between a table and any kind of content.

for "showing a percent" (using Javascript):
function setLengthPercent(ident,percent){
  document.getElementById(ident).style.width=percent+"%";
}
that will give you some funky variable-length bars... if you put them in a fixed width element, and float them to the left or to the right; they will be even funky-er.

for a default radio selection...

first of all, give each radio a meaningful value: <input name="radiobutton" type="radio" value="radiobutton"> for all of them isn't going to mean much to you when you want to use the data. it's correct to give them all the same name, but give them each a relevant value.

and then, to set a default:
<input name="radiobutton" type="radio" value="something_relevant" checked="yes">
Last edited by MattEvans : Dec 14th, 2006 at 3:18 pm.
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 ???

  #13  
Dec 14th, 2006
function setLengthPercent(ident,percent){
document.getElementById(ident).style.width=percent+"%";
}

I dont understand where should I put this?
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 943
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 47
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

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

  #14  
Dec 14th, 2006
prefererably between some script tags in your markup somewhere, or in a linked javascript file... even better, you could put it in a handy library of JavaScript functions for graphing things.... but only if you have NOTHING better to do.

As vishesh said; you should probably learn the basics of JavaScript and the HTML DOM.... W3C sites are helpful to begin with:

http://www.w3schools.com/htmldom/default.asp
http://www.w3schools.com/js/default.asp
http://www.w3schools.com/js/js_obj_htmldom.asp

read through those tutorials in order (for each one, keep clicking the 'next' button until you think you know it, or you hit the end).

occasionally, when a tutorial says "try it yourself", give it a try (you can do it on the site).

once you know what that bit of script does (which you will) you will know how to use it, and hopefully where to put it...
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Reply

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

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

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