FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Button submit avoid...

 


pollux1er
Is it possible to send the datas from a formular by a simple link. This is because i want anothe interface to send my data.
MrBlueSky
Here is an example:

Code:

<html>
<body>

<form name="myform" action="handle-data.php">
Search: <input type='text' name='query'>
<A href="javascript: submitform()">Search</A>
</form>
<SCRIPT language="JavaScript">
function submitform()
{
  document.myform.submit();
}
</SCRIPT>
pollux1er
How do i write the javascript submission?
MrBlueSky
You don't have to. submit() is a builtin Javascript funtion which submits the form, as if the users has clicked a submit button.
pollux1er
Let me try it and tell you the result... Wink
AOP Web Development
oR you may simple go directly to called the submit directly
Code:


<a href="javascript: document.youform.submit();"> SAMPLE LINK</a>



but make it sure that you have the name of your form. Wink
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.