Java script/jquery for a help an online form in the booking module

I need to create an online form in the booking module, where the first picket line would cost X amount and all the following tickets will be sold at the Y. I already have a method of "booking multiple seats under a name', but now I need help with the java script/jquery to additional price items differently.

Thank you

Lana

Thank you, so far, I have an error on the line:

$('.total').html("TOTAL:"totalAmount"");

No idea why?

Thank you

Lana

Booking multiple script of seats

By: Mario Gudelj

modified by Janice McConnell to include the use of discount codes. Note that an entry for the discount code field must be added to the html page.

(function ($) {}

Reservations = function() {}

var discountAmount = 0;

var bookingAmount = 50;  Amount of the reservation in dollars

{$('#seats').change (function ()}

$('.webform').fadeIn ("slow");

var noOfSeats = $("#seats option:selected").val();)  the option selected in the drop-down list

$('.hide').fadeOut ("slow");

$('#BookingAllocation').val (noOfSeats);    set the number of seats

totalAmount = bookingAmount * noOfSeats - discountAmount;

$('#Amount').val (totalAmount);

for (var index = noOfSeats; index > 0; index-) {}

$('.person'+index).fadeIn ("slow");

}

$('.total').html("TOTAL:"totalAmount"");

});

When the user enters the discount code and moves the focus, this function is triggered.

{$('#disCode').blur (function ()}

var discountCode = $(this) .val (); get the discount code

Compare the discount code for the case values and the amount of the discount set. Note all codes and values should be added to the switch statement

Switch (discountCode) {}

case 'DIS5 ':

discountAmount = 5;

break;

case "DIS10":

discountAmount = 10;

break;

case ":

discountAmount = 0;

break;

by default:

Alert ("' Please enter the valid code");

}

var noOfSeats = $("#seats option:selected").val();)

var newTotal = bookingAmount * noOfSeats - discountAmount; Recalculate the total will depend on the number of seats and then subtract discount

$('#Amount').val (newTotal); new amount of the

});

(}) (jQuery);

Tags: Business Catalyst

Similar Questions

  • Java script not working not not in 1 pdf, but the same script does NOT work in other

    Dear Experts,

    I have a problem with java script.

    I created 2 PDF files with the same name under the names of form and shape.

    I wrote a javascript script and the script seems to work in a (Demand2.pdf) and DOES not work in others (exemple.pdf).

    The link for Demand2.pdf is
    https://Acrobat.com/#d=XIydWx1RIU4oNdTySHtHfg

    and the link for exemple.pdf is
    https://Acrobat.com/#d=sKPRs2dtDY57RSvMVtnh3w

    Can you please guide me on this.

    Thank you very much

    BookFans

    Hello

    The second file (exemple.pdf) is saved as Static. The script changes the visual appearance of the form (show and hide objects). This requires the file to save dynamic PDF format. This option is available for registration - as the dialog under the file name.

    Good luck

    Niall

  • With the help of ~, ^ and other special characters in the book module

    Hello guys,.

    I use Lightroom CC and I'm creating a new book using the book module.

    The thing is that when I type some characters like ~ in São Paulo, for example, it shows in Sao Paulo.

    Language of the software is already defined for the Portuguese.

    Is there a way to allow these characters?

    Thank you all.

    Hi Satoshi-kun,

    I do not see that on my system, although as AlliBPort describes above, I'm pasting text from other sources, but diacritics, represents all come very well:

    In this article, I have words like camarão and Tacacá, which runs through without any problem.

    Mike

  • How to enable the Java Script function in APEX 4.2.6 running on the result of an Xquery query.

    How to take a SQL query result in the source section of an APEX "agenda of the page" field and allow this request to be formatted using XML in an HTML format for a Java Script file to perform a function on the result?

    Currently I have the following text:

    To query the DB table and format the result as HTML:

    SELECT XMLELEMENT ("UL id ="ticker01"', XMLAGG (XMLFOREST (Scroll_Mess AS LI))") "item UL' OF Web_Ticker where Mess_Id < 10 order by Mess_Id;


    That displays the following:


    < UL id = "ticker01" > < LI > HELLO < /LI > < LI > HELLO < /LI > < /UL id = "ticker01" >

    I need the output of this to be visible to a JScript function that is currently called the "head of page", but there doesn't seem to be its scope? The function works correctly if there is a list in the page field items 'Text element Pre' but does not work correctly when used in conjunction with the query to generate a table form.

    If everyone is happy to help I would be grateful .

    James.

    Solved!

    In order for the request to be part of the DOM of the page of the APEX, the Java Script allows to perform its function on the result marked "HTML" to query, you must set page of the apex on which the query resides and then add the inner text of this page to a second variable for which the function of web ticker can run on as follows:

    $(function() {})

    var x = $("#P9_TICKER_DATA");

    var y = x [0] .innerText;

    x.Append (y);

    $("UL#ticker01").liScroll ();

    });

    From there, on the Java script is able to properly see the result of the query in HTML format.

  • I need to insert a Java script on my page of muse. What is the best way to do it?

    I have a site I built in Muse. I need to add a video (and not via youtube) to my Muse of the site as well as some Java script. I don't know how to do this. I have a Java script to make appointments and planning but it cannot be added to this page of Muse. Any thoughts? Thank you

    (1) open your project Muse

    (2) add mobile - detect.min.js as file to download

    (3) change the path to the script (add assets / to the path):

    (4) paste this code in the head of the page or master page

    (5) add the remaining code in the page

  • I'm looking on the Lightroom API for ways of working with photos in the develop module, how is it taken in charge?

    I tried to apply an iOS or jump motion to change the photos in the develop module, but I don't see how we could adjust the white slider shows balance or a single button for crops instead.  Is there a way to do what I'm missing?

    If you please repost Lightroom SDK in the forum, and I'm sure someone will help you: Lightroom SDK.

  • The book module won't let me add more pictures of my layouts for my book.

    I started working on a book in LR and everything was fine until what I came back a week later to finish the book and now I can't add photos in the layout. Looks like it is set to a text mode. I have no idea what is happening or how to get out of this mode. Help, please!

    I restarted my computer and now it works. Question answered by me.

  • Added a Zoom Plugin jQuery and needing help to add attributes to the evolution of the poplet images.

    Hey BC community, I looking for a little help with some jQuery / javascript. Overall, I have a plugin to zoom like forcing me to add a data attribute to the image I want to add the zoom effect on. This isn't a problem, but I poplet images that I've adjusted to fill again the big picture. html() rather than the default light box.  The Zoom plugin I use requires a data attribute to be added to all the images I want to have the ability to zoom attached to. I wrote jQuery that adds the attribute data on the original image which is to fill the big image container, but whenever I change the following poplet image, I lose the zoom effect. I hope that makes sense... lol I'm still a javascript / jquery newby.

    Here is the work currently underway. Figure which may help understand the situation better. Here is the site

    I just want to add zoom to any poplet effect is enabled by adding the attribute data and the new file extension required for the expansion of the resolution. Again, please excuse the bad jQuery / javascript, I'm still learning!

    Here's my jQuery / Javascript.

    New features of Poplet

    /*===================================================*/

    function poplet (e) {}

    e.preventDefault ();

    var imgURL = $(this) .attr ('href');

    $('#largeimage').html ("< img src ="' + imgURL + ' "> '");

    }

    /*=======================================

    MAGNIFY

    =======================================*/

    $(document) .ready (function () {}

    var addedAttr = "data-magnify-src";

    var addedExtension = '-large.jpg ";

    var originalExtension is $('.productLarge #largeimage > img') .attr ('src').slice(0,-4);.

    var combinedExtension = originalExtension + addedExtension;

    $('.productLarge_#largeimage_>_img').attr (addedAttr, combinedExtension);

    });

    $(function() {})

    Poplets

    $('.productPopletsItem_a').removeAttr ('onclick release);

    $('body').on (' click on ', '.productPopletsItem a', poplet);

    });

    Yes I fixed it, got help from some other forums. Thank you!

  • Budgeting for public - "&amp; context scenario ' online form

    11.1.2 I installed budgeting in the public sector, some forms have "& context scenario ' as the scenario. I thought this might be a subvar but it is not created in Essbase. Also the fact that there is a space between that cannot make a subvar. We know what this could mean? I can't open the form because he says that the context is not entirely known. Anyone know what this means?

    It's probably a "User Variable", have a read of - http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch07s06.html
    To set user variables have a read-http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_user/user_var.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Help! Do not show the books in my library.

    Started with Windows 8.1 and it worked... for a while.

    Upgrade to Digital Editions 4.5 - problem began.

    Digital Editions uninstalled and reinstalled - same problem.

    Restored to an earlier version - same problem.

    Erased authorization and renewed - same problem

    Upgrade to Windows 10 - same problem.

    I sometimes get books downloaded into the folder where my computer stores - but the 'library' never fills.

    Closed the digital edition.

    Rename the My Digital Edition under your My Digtal Edition.old Documents folder.

    Start new digital edition.

  • Time WTF for the book Module

    Thanks for covering one quarter of EVERY ONE of my pages with this valuable info... but I would really like to see my picture below.

    b.jpg

    It works the same way as it does in the Loupe modes and develop: press simply on the I touch (view > window display the overlay) to make it disappear.

  • Why did the Java script works on my work for Internet explore, but not for Firefox RSS feeds?

    I finished building the Web site for my girlfriend, and the rest is the RSS feed. It works just fine in IE 8, but Fire Fox 9 when the widget is clicked a bookmark box appears and asks if I want to save it as a bookmark. I'm not a programmer of the Java script so I hope help here! Here's the script:

  • "< a href ="http://www.susangabrielle.com/1/feed"title ="RSS"alt ="rss">< /a >"
  • The view is http://www.susangabrielle.com

    Probably you fixed, the RSS seems to work for me

  • Help with Java Script

    Here's my problem:

    I have a field that populate a 18 digit number.

    I need a java script that will fill only the last 4 digits of the 18-digit number in a separte field.

    Then F1 = 18 pre-filled numbers

    F2 = last 4 F1

    Can anyone help?

    Thanks in advance for any help!

    Use what the calculation script customized for F2:

    var F1 = this.getField("F1").valueAsString;

    Event.Value = f1.substring(f1.length-4);

  • Switch to Java Script for perspective / orthogonal projection

    Hi all

    I am developing a button to swith the projectionType between perspective and orthographic projection

    I tried this but does not work:

    ///

    orpr var

    switch (orpr)

    {

    case 1:

    getAnnots3D (this.pageNum) [0] .context3D; C3D. Runtime.sprojectionType ("orthographic");

    orpr = 0

    break;

    by default:

    getAnnots3D (this.pageNum) [0] .context3D; C3D. Runtime.sprojectionType ("perspective");

    orpr = 1

    }

    ///

    anyome help me? I'm not a Java Script programmer.

    Thank you.

    Use the following syntax - the camera is part of the scene, and there may be more than one is in a list. The default camera is at index 0:

    . projectionType.context3D.scene.cameras.getByIndex (0) getAnnots3D (pageNum) [0] = "spelling";

  • app_user in java script

    Hi all
    I need to access: app_user in java script (Action).

    I want to run a java script if: app_user is not equal to one of the elements in the same page.
    I tried to use $v('#p11_pi_pu_code').val () where p11_pi_pu code is a part of my page.

    I waiting for your help.

    Thank you

    Hello

    You cannot use condition in dynamic action?
    Condition type PL/SQL Expression

    :APP_USER != :Px_MY_ITEM_NAME;
    

    Kind regards
    Jari

    Published by: jarola August 3, 2011 11:59

    BTW, if you want to make an element value using the syntax JavaScript is as

    var myVariable = $v("PX_MY_ITEM");
    

    And no need to name to writing in capital letters always

Maybe you are looking for

  • Skype iOS App keyboard: Siri

    My Siri button on my keyboard is grayed out so that it can not be pressed. This is the case of the German and English (United States) keyboard.

  • External audio device for Tecra A11 - 11H

    Although the Tecra A11 - 11 sound better than most laptops, I would definitely come back to the full sound quality.Without any audio output the possibilities seem very limited.USB speakers seem to be either very low powered or high-powered, expensive

  • Satellite P100 - 429 A3 off when windows loads

    Heya. It is a serious problem that made my laptop unusable. I was wondering if anyone knows what it is. I was in a source game when it happened for the first time, I jumped into the game and the laptop just cut off. No classes stop, he just turned di

  • VB6 activex control does not not in labview 8.5

    I am currently trying to get out of VB6 and Laview for some applications to test automated for secondary (rechargeable) batteries. We use Texas Instruments fuel gauges to my business and communication with them requires an EV2300 USB box.  I have the

  • HP Compaq 6910p touch controls no longer works...

    I installed windows 7 Home Premium 32 and also installed Snow Transformation Pack 1.5. I have used and deleted some kind of buttons 1, 2, 3, 4. I did not restore point before using it. Now, I want to use the original Windows 7 without additional exte