Changing the action of a form with JavaScript/jQuery

后端 未结 6 802
借酒劲吻你
借酒劲吻你 2020-11-29 19:40

I\'m having an issue that is driving me crazy. I\'m trying to modify the openid-selector to support facebook. I\'m using RPXNow as my provider so it requires the form to be

6条回答
  •  迷失自我
    2020-11-29 20:31

    Use Java script to change action url dynamically Works for me well

    function chgAction( action_name )
    {
    
     {% for data in sidebar_menu_data %}
    
         if( action_name== "ABC"){ document.forms.action = "/ABC/";
         }
         else if( action_name== "XYZ"){ document.forms.action = "/XYZ/";
         }
    

    }

    {% csrf_token %}

提交回复
热议问题