1

alright, I know related questions have been answered :

What is the cURL command-line syntax to do a POST request?

https://stackoverflow.com/questions/14978411/http-post-and-get-using-curl-in-linux

but my question is rather more basic,

Supposedly we have the following form in a html page:

<form action="/" method="post">
<h3>echo your name:</h3>
<input id="myname" name="myname" type="text" value="nafas">
<input type="image" src="/img/verifyName"  onclick="progress(true)">
<script type="text/javascript">document.write('<a href="#" onclick="document.getElementById(\'myname\').value=\'\';return false">Clear Field</'+'a>')</script>
</form>

Once botton is clicked , it basically echos what ever is typed in the text box

So my question is how exactly do the same thing with "curl". what do I need to echo my name?

server is running locally. I can't provide the link. but let's say its running at http://www.example.com

EDIT 1 :

this is how progress Function look like :

<script type="text/javascript">
function progress(s){var o=document.getElementById("myname");if(o){if(s){o.style.backgroundImage="url(/img/progress.gif)";o.style.backgroundPosition="right center";
o.style.backgroundRepeat="no-repeat";}else{o.style.backgroundImage="none";}}}
</script>
nafas
  • 519

1 Answers1

2

In that form you provided, its Javascript that calls the function progress() and that function echoes the value.

There is no URL to send the value via post. Since it is handled via Javascript, whether curl nor wget can send the form for you.

chaos
  • 4,304