Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 3rd, 2005, 07:12 AM
asim0s asim0s is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: nicosia,cyprus
Posts: 48 asim0s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m 31 sec
Reputation Power: 2
Send a message via ICQ to asim0s Send a message via Yahoo to asim0s
radio button has no properties

im creating a form through php whiche here is the code of it, but when its executed i constantly get a javascript error of

Error: document.form.Delete[i] has no properties


php Code:
Original - php Code
  1. <form action="delete_data.php" method="POST" name="form" onSubmit="return checkforspaces(this)">
  2. <?php
  3. $value = 1;
  4.  
  5. for ($i=0;$i<$nrows;$i++){
  6.     $row = mysql_fetch_array($result);
  7.     extract($row);
  8.     echo "<tr><td><input name="Delete" type="radio" value="$value"></td>nt<td>$username</td>nt<td>$surname</td>nt<td>$address</td>nt<td>$email</td>nt<td>$phone</td>n</tr>n";
  9.     $value = $value + 1;
  10.     echo "<tr>nt<td colspan="6"><hr></td>n</tr>n";
  11. }
  12. echo "<tr><td colspan="6">
  13.      <input type="submit" value="Delete">
  14.      <input type="reset" value="Reset"></td></tr>n";
  15. ?>
  16. </form>


and i have this javascript code to check if something is empty (dunno if this is correct but im a bit of a noob, so take it easy on me )

here is the javascript
//it checks the form as an array for anything that is empty(tested it and worked with text, tottaly forgot radio buttons at that point o.o )
function checkempty(){
alert("papas");

var flag = 0;
pass = "";
for (var i=0; i<document.form.elements.length; i++){
if((document.form.elements[i].value == "")||(document.form.Delete[i].checked)){
alertmsg = alertmsg + ' ' +document.form.elements[i].name+'n';
pass = false;
flag = flag + 1;
}
}
if (flag > 0){
alertmsg = 'The following are required:n' + alertmsg;
alert (alertmsg);
}else
checksubmit();
}

i hope i was descriptive enough

Reply With Quote
  #2  
Old October 4th, 2005, 12:33 PM
asim0s asim0s is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: nicosia,cyprus
Posts: 48 asim0s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m 31 sec
Reputation Power: 2
Send a message via ICQ to asim0s Send a message via Yahoo to asim0s
RE: radio button has no properties

ok fixed

stupid mistake of mine

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > radio button has no properties


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT