Form which i getting from ajax not working in admin panel Magento 2Why does my ajax add to cart not push the right product to the cart?Mass action in the grid in tab redirects to dashboard in magento2Magento 2 Add new field to Magento_User admin formData save in magento 2.1 product formMagento 2: How to submit form on checkbox click?Magento 2 - Send processed data from Controller to PHTMLForm is not displayed on panel admin Magento 2how to add category using factory method not object managerCall block action using AjaxHow to create custom form in Magento 2.2.3
Why are Hobbits so fond of mushrooms?
Who Can Help Retag This?
What's a moment that's more impactful on a reread called?
How can an advanced civilization forget how to manufacture its technology?
Bishop game - python
<schwitz>, <zwinker> etc. Does German always use 2nd Person Singular Imperative verbs for emoticons? If so, why?
As the Dungeon Master, how do I handle a player that insists on a specific class when I already know that choice will cause issues?
Does Google Maps take into account hills/inclines for route times?
Is Trump personally blocking people on Twitter?
How can I deal with a player trying to insert real-world mythology into my homebrew setting?
How can one write good dialogue in a story without sounding wooden?
Correct use of ergeben?
Filtering fine silt/mud from water (not necessarily bacteria etc.)
Supporting developers who insist on using their pet language
Where is the USB2 OTG port on the RPi 4 Model B located?
Is an acid a salt or not?
How do I take a fraction to a negative power?
Why is dry soil hydrophobic? Bad gardener paradox
Why did the Japanese attack the Aleutians at the same time as Midway?
How do I determine whether a permit is required for a new gas line?
The monorail explodes before I can get on it
Why isn't there research to build a standard lunar, or Martian mobility platform?
What is temperature on a quantum level
Are there any double stars that I can actually see orbit each other?
Form which i getting from ajax not working in admin panel Magento 2
Why does my ajax add to cart not push the right product to the cart?Mass action in the grid in tab redirects to dashboard in magento2Magento 2 Add new field to Magento_User admin formData save in magento 2.1 product formMagento 2: How to submit form on checkbox click?Magento 2 - Send processed data from Controller to PHTMLForm is not displayed on panel admin Magento 2how to add category using factory method not object managerCall block action using AjaxHow to create custom form in Magento 2.2.3
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page, but when I use this form without Ajax, then it works fine, thanks for help
<form class="wrapper" method="GET" name="go_to_print_page" id="go_to_print_page" action="<?php echo $createAction; ?>">
<input name="send_customer_id" class="send_customer_id" type="hidden" value="<?php echo $customerId; ?>" />
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
<button type="submit" class="submit"><?php echo __("View");?></button>
</form>
AJAX REQUEST
jQuery.ajax({
url: url,
type: "POST",
data: createdFrom:createdFrom,createdTo:createdTo,
showLoader: false,
cache: false,
success: function(response)
jQuery('#printTable_wrapper').html(response.output);
jQuery('#printTable_wrapper').trigger('contentUpdated');
);
magento2 ajax admin-panel
add a comment |
I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page, but when I use this form without Ajax, then it works fine, thanks for help
<form class="wrapper" method="GET" name="go_to_print_page" id="go_to_print_page" action="<?php echo $createAction; ?>">
<input name="send_customer_id" class="send_customer_id" type="hidden" value="<?php echo $customerId; ?>" />
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
<button type="submit" class="submit"><?php echo __("View");?></button>
</form>
AJAX REQUEST
jQuery.ajax({
url: url,
type: "POST",
data: createdFrom:createdFrom,createdTo:createdTo,
showLoader: false,
cache: false,
success: function(response)
jQuery('#printTable_wrapper').html(response.output);
jQuery('#printTable_wrapper').trigger('contentUpdated');
);
magento2 ajax admin-panel
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58
add a comment |
I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page, but when I use this form without Ajax, then it works fine, thanks for help
<form class="wrapper" method="GET" name="go_to_print_page" id="go_to_print_page" action="<?php echo $createAction; ?>">
<input name="send_customer_id" class="send_customer_id" type="hidden" value="<?php echo $customerId; ?>" />
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
<button type="submit" class="submit"><?php echo __("View");?></button>
</form>
AJAX REQUEST
jQuery.ajax({
url: url,
type: "POST",
data: createdFrom:createdFrom,createdTo:createdTo,
showLoader: false,
cache: false,
success: function(response)
jQuery('#printTable_wrapper').html(response.output);
jQuery('#printTable_wrapper').trigger('contentUpdated');
);
magento2 ajax admin-panel
I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page, but when I use this form without Ajax, then it works fine, thanks for help
<form class="wrapper" method="GET" name="go_to_print_page" id="go_to_print_page" action="<?php echo $createAction; ?>">
<input name="send_customer_id" class="send_customer_id" type="hidden" value="<?php echo $customerId; ?>" />
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
<button type="submit" class="submit"><?php echo __("View");?></button>
</form>
AJAX REQUEST
jQuery.ajax({
url: url,
type: "POST",
data: createdFrom:createdFrom,createdTo:createdTo,
showLoader: false,
cache: false,
success: function(response)
jQuery('#printTable_wrapper').html(response.output);
jQuery('#printTable_wrapper').trigger('contentUpdated');
);
magento2 ajax admin-panel
magento2 ajax admin-panel
asked Jul 4 at 13:43
Robinio TorRobinio Tor
35311 bronze badges
35311 bronze badges
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58
add a comment |
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58
add a comment |
1 Answer
1
active
oldest
votes
Your URL is wrong. Try following way so you can get correct URL for admin action:
$block->getUrl('cart/printcartinfo');
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280840%2fform-which-i-getting-from-ajax-not-working-in-admin-panel-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your URL is wrong. Try following way so you can get correct URL for admin action:
$block->getUrl('cart/printcartinfo');
add a comment |
Your URL is wrong. Try following way so you can get correct URL for admin action:
$block->getUrl('cart/printcartinfo');
add a comment |
Your URL is wrong. Try following way so you can get correct URL for admin action:
$block->getUrl('cart/printcartinfo');
Your URL is wrong. Try following way so you can get correct URL for admin action:
$block->getUrl('cart/printcartinfo');
answered Jul 4 at 14:31
Sohel RanaSohel Rana
24.9k3 gold badges47 silver badges65 bronze badges
24.9k3 gold badges47 silver badges65 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f280840%2fform-which-i-getting-from-ajax-not-working-in-admin-panel-magento-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$createAction how you create this url?
– Sohel Rana
Jul 4 at 13:56
$createMyAction = $baseUrl.'/cart/printcartinfo/';
– Robinio Tor
Jul 4 at 13:58