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:
Thank you,
Kent
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
I would like to be able to include PHP code in JavaScript as well. Please post if you come up with a solution.
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
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
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...
That was definitely the trick..
Works great!
Thank you,
Kent
Works great!
Thank you,
Kent