View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
I got the answer!  I read in a JavaScript manual, that you can actually post values using   window.location.href = "http://mike/GetValues.fwx?Code="+mCODE    By placing this inside a function called by a link would "Send" the value of mCODE on the GetValues.fwx without using any form or button.
 
-Mike-
 
 
Sent by FoxWeb Support on 01/21/2003 10:17:19 AM:
The second example, which illustrates how you can send POST data with a link does not display a form at all.  The form only contains hidden fields, so it's invisible.  If you need to have a large number of links and their data will be known from the start, then using GET makes more sense.
 
The example was only provided to answer your question about sending POST data without a submit button.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/20/2003 05:55:22 PM:
Thanks for this info, my second question is that:
What if you don't have a Form?  nor an input box?  Can you still submit just using the values from variables?  From the samples below you have used an input box.  Thanks again!
 
-Mike-
 
Sent by FoxWeb Support on 01/20/2003 04:36:43 PM:
The GET method uses the query string portion of the URL:
 
 
The above URL is what will be sent anyway if you create a form which uses the GET method and contains two fields, first and last:
 
<form action="show_cgi.fwx" method="GET">
<input type="text" name="first"><input type="text" name="last"><br>
<input type="submit" value="Submit">
</form>
 
Sending POST data from a link requires javascript code:
 
<form action="http://localhost/show_cgi.fwx" method="POST" name="myform">
<input type="hidden" name="first" value="Mike">
<input type="hidden" name="last" value="Pena">
</form>
<a href="#" onclick="document.myform.submit()">Submit</a>

In the above example, note how the desired values are set in hidden form fields.  The link simply causes the browser to submit the form.

FoxWeb Support Team
support@foxweb.com email

Sent by Michael Pena on 01/20/2003 02:05:36 AM:
Is it possible to submit data using GET or POST without using the Form or Submit button.   Or is it possible to use a Text Link to Submit data?
 
-Mike-