what is the way to post with link item .

35 views
Skip to first unread message

Rakesh PD

unread,
Oct 21, 2013, 8:40:36 AM10/21/13
to google-ajax...@googlegroups.com
THIS IS WORKING CODE USING DROPDOWN LIST AND SUBMIT BUTTON.

<form action="/i18n/setlang/" method="post">{% csrf_token %}
          <select name="language">
              <option value="en" width=10px>English</option>
              <option value="hi" width=10px>Hindi</option>
              <option value="ml" width=10px>Malayalam</option>
</select>
<input type="submit" value="Go" />
</form-->

WHAT IS THE WAY TO DO THIS same TASK USING LINK(<A> </A>) AND WITHOUT A BUTTON.

WHEN CLICK ON A LINK THESE HAVE TO PERFORM 
1.  action="/i18n/setlang/"
2. method="post"
((((SEE THE ATRIBUTE IN THE <FORM> TAG )))

Jeremy Geerdes

unread,
Oct 21, 2013, 10:18:25 AM10/21/13
to google-ajax...@googlegroups.com
There is no way to pass the language attribute via post with a simple <a> tag. If the form processor can accept queries via GET, you could use <a href="/i18n/setlang/?language=<LANG_CODE_HERE>">...</a>. If the processor is not set up to accept input via the query string like that, you'll need to alter the script so that it can in order to do what you're proposing.

jg


--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/ecc2191f-0fa3-4db6-b977-02791b11b007%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

Christopher Bijalba

unread,
Oct 21, 2013, 10:38:57 AM10/21/13
to google-ajax...@googlegroups.com
here's how to submit a form via <a> tags using javascript.

<form id="myform" method="POST" action="xxx">
    <!-- your stuff here -->
    <a href="javascript:void()" onclick="document.getElementById('myform').submit();>Ponies await!</a>
</form>


Reply all
Reply to author
Forward
0 new messages