• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NP
#1 Posted : Thursday, December 27, 2018 7:21:28 AM(UTC)
NP

Rank: Member

Joined: 2/10/2017(UTC)
Posts: 62
India
Location: Nashik, Maharashtra

Thanks: 6 times
Hello Team,

We are using BVC2013. We want to customise "Gift Certificates" user control from "www\BVModules\Controls\GiftCertificates.ascx" path which is used on checkout module.

We have added following hidden field on GiftCertificates.ascx:
<asp:HiddenField ID="HdnGCResult" runat="server" Value="testval" ClientIDMode="Static" />

We have call client side function on click of AddGiftCertificateImageButton and set value to this hiddenfield using jquery in JS custom function as follows:
$('#HdnGCResult').val("121")

When we debug function value get set to this hidden field and also able to see in HTML while rendering HTML. When server side AddGiftCertificateImageButton_Click event occurred after calling client side event the newly assigned hidden field value (i.e. "121") not display on server side but hidden field displays "testval". Since check out page may be get refresh.

Could you please suggest how can we get hidden filed value which is set by jquery function?

Thank You.
Aaron
#2 Posted : Thursday, December 27, 2018 10:11:31 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
It could be AJAX-related. Many of the Anthem controls on the page do AJAX postbacks (callbacks) so if that's what is happening here, and your hidden field isn't an Anthem control (or wrapped by an Anthem control), chances are the updated value won't be available unless you were doing a regular postback. I would start by change your HiddenField control to an Anthem control (i.e. <anthem:HiddenField>) to see if that fixes it for you. Note that you may need to set the AutoUpdateOnCallBack property to "true".
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012