Re: [PHP] select option and php

2006-07-25 Thread Jochem Maas
weetat wrote:
 Hi Jay ,
 
I am not in the javascript group.

'the javascript group' ??

   document.forms['listfrm'].submit;

document.forms['listfrm'].submit();

^^--- i.e. actually call the method

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



RE: [PHP] select option and php

2006-07-24 Thread Jay Blanchard
[snip]
It will produce the html tag as shown below:
script language=JavaScript
function gotoPage(){

  var urlpath = ../listflag.php?start=pageID=+3;
  document.forms['listfrm'].method = 'post';
  document.forms['listfrm'].action = urlpath;
  document.forms['listfrm'].submit;

}
/script

form name=listfrm
Go to Page:select name=pageid class=inputfield 
onchange=javascript:gotoPage()
option value=11/option
option value=22/option
option value=33/option
option value=44/option
option value=55/option
/select   
/form 


I tried using onchange in the select tag,but it did not work. It go to 
the javascript but the form is not submitted .

Anyideas why?
[/snip]

In gotoPage() you're not referencing the value of pageid
(document.forms['listfrm'].pageid.value). More of a JavaScript question,
are you a member of a JavaScript list?

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



Re: [PHP] select option and php

2006-07-24 Thread weetat

Hi Jay ,

   I am not in the javascript group.
   Btw , i have added document.forms['listfrm'].pageid.value in the 
page , but the form is not submitted ?


  var pageid = document.forms['listfrm'].pageid.value;
  var urlpath = ../listflag.php?start=pageID=+pageid;

  document.forms['listfrm'].method = 'post';  -- did not submit form 
at all

  document.forms['listfrm'].action = urlpath;
  document.forms['listfrm'].submit;

Any ideas why ? How to submit form when user change value in the select 
tag ?


Thanks


Jay Blanchard wrote:

[snip]
It will produce the html tag as shown below:
script language=JavaScript
function gotoPage(){

  var urlpath = ../listflag.php?start=pageID=+3;
  document.forms['listfrm'].method = 'post';
  document.forms['listfrm'].action = urlpath;
  document.forms['listfrm'].submit;

}
/script

form name=listfrm
Go to Page:select name=pageid class=inputfield 
onchange=javascript:gotoPage()

option value=11/option
option value=22/option
option value=33/option
option value=44/option
option value=55/option
/select 
/form   


I tried using onchange in the select tag,but it did not work. It go to 
the javascript but the form is not submitted .


Anyideas why?
[/snip]

In gotoPage() you're not referencing the value of pageid
(document.forms['listfrm'].pageid.value). More of a JavaScript question,
are you a member of a JavaScript list?


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