submit a joomla form via javascript

hi am trying to submit a page from a javascript code can get the java to run ok but cannot get the page to submit from the javascript call
can any one give me a heads up please


<form name="{$frmname}" method="get" action="index.php?"><input
      type="text" name="option" value="com_content" /><input type="text"
      name="view" value="article" /><input type="text" name="id"
      value="15" /><input type="text" name="Itemid" value="31" />
      
<p></p>


<script type="text/javascript">
<!--
function popup() {
      alert(document.getElementById('typeclient').value);
      
    alert("Hello World");
      // alert($frmname);
      // document.{$frmname}.submit();
      var gettag = document.getElementById ("frmname:page");
      alert(gettag);
frmName.submit(frmName);  ??????

}
//-->
</script>
<input type="button" onclick="popup()" value="popup">
sydneyguyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Abhijeet RananawareWeb & Mobile DeveloperCommented:
For Saving

frmName.submitbutton('save')

For Cancel

frmName.submitbutton('cancel')


This should work

Regards,
Abhijit
0
sydneyguyAuthor Commented:
does not run still will not submit
do i need to have the real form name in place of frmName??
0
Abhijeet RananawareWeb & Mobile DeveloperCommented:
First of all ..are you trying to submit in front end or backend ?

Give form name "adminForm"

Have you included joomla.javascript.js ?

Regards.
abhijit
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sydneyguyAuthor Commented:
the java script is working ok
<form name="{$frmname}" method="get" action="index.php?"><input
were {$frmname} is null but looks like the name is not required as it uses
type="text" name="option" value="com_content" /><input type="text"
      name="view" value="article" /><input type="text" name="id"
      value="15" /><input type="text" name="Itemid" value="31" />

for the index selection of what to do with it
so have named the page does not seem to affect its operation and then the below line and now it works fine. so just need to verify the inputs and its right to go thanks for the help happy xmas

document.forms["abcform"].submit();
0
Abhijeet RananawareWeb & Mobile DeveloperCommented:
Glad you found solution..

Merry Christmas
Abhijit
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.