man, that was quick
you folks rock my world
"
You do realise that the value of $i is being written BEFORE the user double clicks so nothing they do can change it?
"
sure, but maybe i am misunderstanding...
in my select box, i have x number of projects that the user can dbl click on...depending on which one they choose, i = 1 or 3 or whatever number.
But I can't seem to get the value to translate when the dbl click happens and the link is used.
(see code below)
"
Check the source of your page to see what I mean...
"
not sure that I do
"
If you have a URL you can post, I'd be interested to take a look - If I can find a fix I'll be able to use it myself!
"
i can post the code, but not the URL:
basically:
<script language="JavaScript" type="text/javascript">
function goNow()
{
document.location = "viewp.php?i=<?php echo $i ?>";
}
</script>
<form blah>
<select name="i" size=17 onChange="clear_field();" ondblclick="goNow()">
<?php
$query = "SELECT id,concat(date_format(start,'%Y-%m'),'-',counter) as d".
",description FROM projects AS p";
$db->query($query);
while ($db->next_record()) {
make_select($db->f("id"),title($db->f("id")));
}
?>
</select>