[PHP] onchange = $_SESSION['Alarm'] = getelementbyid('alarmReport').value ;

2003-08-26 Thread Mrunal Wagh
hi,

I have a SELECT in which I would like to store the variable value in the
Session variable of onchange event of the SELECT.  I am stuck up with the
syntax could u please help.

Select name=AlarmReport id = AlarmReport **I want to do this*
onchange = $_SESSION['Alarm'] = getelementbyid('AlarmReport').value 
option value='1 day'1 day /option
 option value='2 days'2 days /option
 option value='7 days'7 days /option
 option value='1 month'1 month /option
 option value='1 year'1 year /option
/Select

Best Regards,
Mrunal

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] onchange = $_SESSION['Alarm'] = getelementbyid('alarmReport').value;

2003-08-26 Thread Marek Kilimajer
getelementbyid('AlarmReport').value will not get the value of the 
selected option. Use
this.options[this.selectedIndex].value

Session var can be set only on the server, you must post the form to get 
the value or use some javascript to do it, eg:
img = new Image();
img.src=set_session_var.php?varname= + 
this.options[this.selectedIndex].value;

Mrunal Wagh wrote:

hi,

I have a SELECT in which I would like to store the variable value in the
Session variable of onchange event of the SELECT.  I am stuck up with the
syntax could u please help.
Select name=AlarmReport id = AlarmReport **I want to do this*
onchange = $_SESSION['Alarm'] = getelementbyid('AlarmReport').value 
option value='1 day'1 day /option
 option value='2 days'2 days /option
 option value='7 days'7 days /option
 option value='1 month'1 month /option
 option value='1 year'1 year /option
/Select
Best Regards,
Mrunal
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php