0

The output was long so I attached it.

Attachments
1<html>
2<head>
3 <script type="text/javascript">
4 function jfunc(athlete,event,res)
5 {
6
7 var result = document.getElementById('textres'+res).value;
8 window.location='?action=UpdateResult&athlete_id='+athlete+'&event='+event+'&result='+result;
9 }
10 </script>
11
12</head>
13<body>
14<head> <link rel="stylesheet" href="style/style.css" type="text/css"></head>
15
16<style type="text/css" media="screen">@import "includes/layout.css";</style>
17
18<body>
19<div id="Header">Over The Hill Decathlon</div>
20
21<div id="Content">
22<!-- End of Header -->
23
24
25<div id="leftcolumn">
26<h1>Welcome admin!</h1><br /><h4>Administrator Links</h4><a href="add_athlete.php" title="Add Athlete">Add Athletes</a><br />
27 <a href="viewathlete.php" title="View Athletes">View Athletes</a><br />
28 <a href="manageathlete.php" title="Manage Athletes">Manage Athletes</a><br /><br/><a href="meventresults.php" title="View Users">Manage Event Results</a><br /><a href="mathleteresults.php" title="View Users">Manage Athlete Results</a><br /><a href="viewallresults.php" title="View Users">View All Results</a><br /><a href="vieweventresults.php" title="View Users">View Event Results</a><br /><a href="viewathleteresults.php" title="View Users">View Athlete Results</a><br />
29<br/>
30<div id='userbox'>
31
32 <ul>
33 <li><a href='./changepassword.php'>Change Password</a></li>
34 <li><a href='./logout.php'>Logout</a></li>
35 </ul>
36 </div>
37
38
39
40<br/>
41</div>
42
43
44
45<div id="main">
46<form name="list" action="mathleteresults.php" method="post"><table align="center" cellspacing="0" cellpadding="5" width="155%">
47<tr>
48 <td align="left"><b>Edit</b></td>
49 <td align="left"><b>FirstName</b></td>
50 <td align="left"><b>LastName</b></td>
51 <td align="left"><b><a href="mathleteresults.php?sort=event">Event</a></b></td>
52 <td align="left"><b><a href="mathleteresults.php?sort=result">Results</a></b></td>
53 <td align="left"><b>Date</b></td>
54</tr><tr bgcolor="#ffffff">
55 <td align="left"><a href="javascript:void(0)" onclick="jfunc(187,100m Swim,1)" />Update</a></td>
56 <td align="left">Test</td>
57 <td align="left">Test</td>
58 <td align="left"><input name="event" size="10" id="event" value="100m Swim"></td>
59 <td align="left"><input type="text" name="textres1" id="textres1" value="59:12:00" /></td>
60 <td align="left">2010</td>
61 </tr></table></form></div>
62
63
64<div id="footer">
65
66<style type="text/css" media="screen">@import "includes/layout.css";</style>
67<div id="footer">
68 <div id="bottomcontainer">
69 <div class="boxlt">
70 <p>Created by: Damon Powell<br/>
71 Copyright: <a href="">DSP INC</a></p>
72 </div>
73 </div>
74</div>
75
76</div>
77
78</div>
79</body>
80</html>
0

No, that was the output from the error code from firebug. Still getting the "missing ) after argument list jfunc(187,100m Swim,1)" I'm not sure if the issue is with the below command or the function.

<td align="left"><a href="javascript:void(0)" onclick="jfunc('.$row["id"].','.$row["event"].','.$i.')" />Update</a></td>

0

sorry dude im out of idea, but thats the only possible error i could think of, coz when i examined your code, i noticed that at first it lacking the closing parenthesis of the jfunc() function, the code look like this

<a href="javascript:void(0)" onclick="jfunc('.$row["id"].','.$row["event"].','.$i.'" />Update</a>

so its clear that it will be an error if you dont close your function

so you must append the closing parenthesis of jfunction()

<a href="javascript:void(0)" onclick="jfunc('.$row["id"].','.$row["event"].','.$i.')" />Update</a>
0

Thanks a lot vaultdweller123 for all the help the past few days. This is my first attempt at php so has been a learning experience. I was able to finally get it working wit the below syntax. I have to work on the way it refreshes as it doesn't post the new result until I refresh the screen but after I do the new value is posted so I'm ok with that for now. Again thanks for the help.

<td align="left"><a href="javascript:void(0)" onclick="jfunc('.$row["id"].',\''.$row["event"].'\','.$i.')">Update</a></td>
0

Fixed the refresh issue as well. Just added the below after the update statment.

header("Location: mathleteresults.php");
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.