Auto Submit form does not work

Permalink
I am using the PHP Block with C5 and it works great.. However, I have a JavaScript Form that does an "autoSubmit" on change of the dropdown.. It works great on the old site. However, I want to use it in Concrete..

Here is a snip of the code that I am using:
<script language="JavaScript">
  function autoSubmit()
  {
      document.forms['Locator'].submit();
      }
</script>
<?
$file = $_SERVER["SCRIPT_NAME"];
$break = Explode('/', $file);
$pfile = $break[count($break) - 1]; 
?>
  <tr>
    <td colspan="3"><center>
      <form name="Locator" action="<? echo $pfile; ?>?cID=90" method="get">


Thank you,

Kent

kdyer
 
nbruley replied on at Permalink Reply
I would like to be able to include PHP code in JavaScript as well. Please post if you come up with a solution.
kdyer replied on at Permalink Reply
kdyer
Probably the best way to show you is show what we are using today..

http://masonic-oregon.com/content/about/LodgesbyLodge.php...

Please note: This is not the Concrete page, but is to show what we are using today and works fine..

The Concrete page is:
http://www.masonic-oregon.com/concrete/index.php?cID=90...

The problem is that when you click on the dropdown, it goes to:

http://www.masonic-oregon.com/concrete/index.php... even though I want it to submit the form to itself..

Thanks,

Kent
nbruley replied on at Permalink Best Answer Reply
Don't have a clue if it would help, but you could try using pretty urls instead which makes the page a subdirectory and gives it a more definite name...
kdyer replied on at Permalink Reply
kdyer
That was definitely the trick..

Works great!

Thank you,

Kent