Quote:
Originally Posted by louis_chypher
andreamarucci, replace your calendar_roll with:
Code:
<p><strong><phrase 1="$rollcount">$vbphrase[roll_text]</phrase></strong></p>
<if condition="$rollbits">
<ul>
$rollbits
</ul>
<else />
<p><i>$vbphrase[roll_nobody]</i></p>
</if>
<if condition="$bbuserinfo[userid] > 0 && $show[enroll]">
<if condition="$show[userattending]">
<a href="calendar.php?$session[sessionurl]do=getinfo&ea=unattend&e=$eventinfo[eventid]">$vbphrase[roll_cancel]</a>]
<else />
<!-- Number in Party field -->
<input type="hidden" name="pc_surl" value="$session[sessionurl]">
<input type="hidden" name="pc_eventid" value="$eventinfo[eventid]">
<input type="hidden" name="pc_pharse" value="$vbphrase[roll_enroll]">
</br>
<div id="attendlink">
<a
href="calendar.php?$session[sessionurl]do=getinfo&ea=attend&e=$eventinfo[eventid]">$vbphrase[roll_enroll]</a>
</div>
</br>
<div id="option_attendlink">
<select name="option_partycount" size="1" onchange="doAttend(this);">
<option>Number of people</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</div>
<script language="javascript">
function doAttend(oSelect)
{
var i=oSelect.selectedIndex;
var sVar;
sVar= '<a href="calendar.php?'+document.calendar_showeventsbit.pc_surl.value+ 'do=getinfo&ea=attend&e='+
document.calendar_showeventsbit.pc_eventid.value +
'&pc=' +
oSelect.value+'">' +
document.calendar_showeventsbit.pc_pharse.value+'</a>';
document.getElementById("attendlink").innerHTML = sVar;
}
</script>
<!-- / Number in Party field -->
</if>
</if>
|
I did this (along with the other changes you listed), and the drop down box seems to work, but the total attendance only gets updated by '1' regardless of the selected number. In other words if you select '2' it shows 'Username, 1' in the list of attendees and only increases the total count by 1.
What am I missing?
EDIT: I just noticed that there is an "Error on page" message in the status bar as soon as I select a number from the drop-down box. This is the error:
Quote:
Line: 871
Char: 1
Error: 'document.calendar_showeventsbit.pc_surl' is null or not an object
Code: 0
URL: http://~~~/calendar.php?
|
If I just click on the link without selecting a number from the drop down box, I do not get an error. Does this help?