JavaScript message boxes not working

Hi all.  I am Trying to get a few popup messages to work on a form but have not been successful at all. I did this once before and I did work but on this form I have had no luck.  No popup messages work at all and I get no error message.  Please see if you can help with my script.  if(root.P1.matched.Consent.rawValue == 1) {    if(root.P1.client.variable_option_client.cv6.rawValue == null && root.P1.client.variable_option_client.cv7.rawValue == null && root.P1.client.variable_option_client.cv25.rawValue == null)        xfa.host.messageBox("Please enter at least one contact number and select a product from the Product Section.", "Notice", 1);        root.P1.matched.Consent.rawValue = 0 ;    }    else if ((root.P1.client.variable_option_client.cv6.rawValue != null || root.P1.client.variable_option_client.cv7.rawValue != null) && root.P1.client.variable_option_client.cv25.rawValue == null    && root.P1.client.variable_option_client.cv26.rawValue == null && root.P1.client.variable_option_client.cv27.rawValue == null && root.P1.client.variable_option_client.cv28.rawValue == null)    {        xfa.host.messageBox("Please select a product from the Product Section.", "Notice", 1);        root.P1.matched.Consent.rawValue = 0;    }    else if ((root.P1.client.variable_option_client.cv6.rawValue == null && root.P1.client.variable_option_client.cv7.rawValue == null) && root.P1.client.variable_option_client.cv25.rawValue != null)    {        xfa.host.messageBox("Please enter at least one contact number.", "Notice", 1);        root.P1.matched.Consent.rawValue = 0 ;     }             else if ((root.P1.client.variable_option_client.cv6.rawValue != null || root.P1.client.variable_option_client.cv7.rawValue != null) && root.P1.client.variable_option_client.cv25.rawValue != null)    {           root.P1.matched.EmailSubmitButton1.presence = "visible";           root.P1.matched.EmailSubmitButton2.presence = "visible";           // this is event that triggers the script to lock all fields.           //myScriptObject.LockAllFields(root.P1.client.variable_option_client);            //myScriptObject.LockAllFields(root.P1.client.variable_option_client.cv6);                    if (root.P1.client.variable_option_client.DateTimeField1.$.rawValue > "15:00")                 {                    xfa.host.messageBox("The time is after 3pm. Please inform the customer that they are likely to be contacted on the next working day.");        }     }   }    else  {              root.P1.matched.EmailSubmitButton1.presence = "invisible";              root.P1.matched.EmailSubmitButton2.presence = "invisible"; }  Thanks  Joey

Hi,
I think you are missing a bracket in the code. I have put the bracket where I think it is missing ( made it bold and a little bigger too). Having a look at the logic but it looks alright at first glance.
if(root.P1.matched.Consent.rawValue == 1)
if(root.P1.client.variable_option_client.cv6.rawValue == null && root.P1.client.variable_option_client.cv7.rawValue == null && root.P1.client.variable_option_client.cv25.rawValue == null)
xfa.host.messageBox("Please enter at least one contact number and select a product from the Product Section.", "Notice", 1);
root.P1.matched.Consent.rawValue = 0 ;
else if ((root.P1.client.variable_option_client.cv6.rawValue != null || root.P1.client.variable_option_client.cv7.rawValue != null) && root.P1.client.variable_option_client.cv25.rawValue == null    && root.P1.client.variable_option_client.cv26.rawValue == null && root.P1.client.variable_option_client.cv27.rawValue == null && root.P1.client.variable_option_client.cv28.rawValue == null)
xfa.host.messageBox("Please select a product from the Product Section.", "Notice", 1);
root.P1.matched.Consent.rawValue = 0;
else if ((root.P1.client.variable_option_client.cv6.rawValue == null && root.P1.client.variable_option_client.cv7.rawValue == null) && root.P1.client.variable_option_client.cv25.rawValue != null)
xfa.host.messageBox("Please enter at least one contact number.", "Notice", 1);
root.P1.matched.Consent.rawValue = 0 ;
else if ((root.P1.client.variable_option_client.cv6.rawValue != null || root.P1.client.variable_option_client.cv7.rawValue != null) && root.P1.client.variable_option_client.cv25.rawValue != null)
root.P1.matched.EmailSubmitButton1.presence = "visible";
root.P1.matched.EmailSubmitButton2.presence = "visible";           // this is event that triggers the script to lock all fields.         
//myScrip tObject.LockAllFields(root.P1.client.variable_option_client);            //myScrip tObject.LockAllFields(root.P1.client.variable_option_client.cv6);                    if (root.P1.client.variable_option_client.DateTimeField1.$.rawValue > "15:00")
xfa.host.messageBox("The time is after 3pm. Please inform the customer that they are likely to be contacted on the next working day.");
else
root.P1.m atched.EmailSubmitButton1.presence = "invisible";              root.P1.m atched.EmailSubmitButton2.presence = "invisible";
Regards
Malcolm

Similar Messages

  • ExportAsFDF javascript method is not working with Reader 10.1.1

    Hi,
    I have pdf document in which I have applied all Extendend Reader Rights. And now when I am trying to exports alll annotation in fdf with Reader 10.1.1 then it is faling to export. However it is working fine with Reader 10.0.0. Looks like this is broken in later version of 10.0.0.
    Please let me know if any alternative solution is there to export all annotation in fdf file thru code.
    Regards,
    Arvind

    I would open a formal support ticket with our developer support folks.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Sun, 27 Nov 2011 22:48:35 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: exportAsFDF javascript method is not working with Reader 10.1.1
    exportAsFDF javascript method is not working with Reader 10.1.1
    created by arvindg007<http://forums.adobe.com/people/arvindg007> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4049525#4049525

  • E75 messaging application not working

    Hi,
    I have recently purchased an E75 and at first glance it looks to be very nice. However, now i have run into the problem that messaging is not working properly. The message indicator is telling me that I have 6 new messages. When I try to go menu>>messages the application tries to open but immediately crashes. Also when I try to open the messages directly by clicking on them from the message indicator the same behavior seems to happen.
    Has anybody experienced the same? How do I get rid of these messages if I can't open them?
    Any help is appreciated, thanks.
    Porthos
    Message Edited by porthos on 13-Oct-2009 02:54 PM

    I've had similar problems with my E75.
    I've found that Nokia Messaging simply gets confused & over-loaded, and gives up.
    Try accessing you email account from your computer.
    Then, delete all of your messages from your inbox & sent folders.
    Basically, purge as much as possible.
    Then try accessing it from your E75.
    This usually works for me.
    Message Edited by car2fast4you on 02-Nov-2009 05:33 PM

  • Captivate 4 AS2 Text Entry Box not working with Flash Player 11

    I am having issues with text entry boxes not working at all in flash 11. I am using Captivate 4 and exporting an AS2 swf. When you get to the slide you can type but you cannot see anything nor does the button or keystroke to move on. Also there is no cursor. Any ideas?

    You said it is not working with Flash 11, so does that mean you tested with previous version and that worked?
    While publishing choose Flash player as 9 and publish that, verify if that plays in a compatible web browser.
    AS 2 is a legacy scripting, it has been said not too be supported with even Flash Player 10 --
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part2_AS2_LangRef_1.html
    I believe if you switch back to version 9 while publish your project, it should work.
    Thanks,
    Anjaneai

  • Not sure why Message is not working on my ipad.

    Not sure why message is not work on my iPad. It works find on my iPhone.

    http://support.apple.com/kb/TS2755

  • My I message is not working, since IOS 8.3 update.

    My messages is not working properly, since IOS 8.3 update. Message are left hanging as undelivered. When I tap on "try again" nothing happens. Even messages to known contacts with I phones, appear in green and does not get delivered anyway. I have reset my i phone several times to no avail. I like my I phone 6+ as a camera. All other functions are less than impressive.

    Hi iambackbaby,
    In order to help resolve this issue where you are unable to send messages from your iPhone, please follow the directions in the link below.
    If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support
    Take care,
    Alex H.

  • Javascript Foucs is not working In IE

    I have tabular in in APEX page
    In tabular form on one textbox onblur="setfocs();"
    And i set focus on button using javascript as below.
    <script type="text/javascript">
    function setfocs()
    document.getElementById('add_row_id').focus();
    </script>
    Javascript in HTML header part of the page.
    'add_row_id' is button id.
    That is working fine in Firefox but not working on IE and Chrome.
    Can any one have idea?
    Thanks

    Hi,
    This is a documented issue. Please see http://www.mkyong.com/javascript/focus-is-not-working-in-ie-solution/
    Cheers,
    PS: Many more resource on the subject here
    Edited by: Prabodh on Jul 31, 2012 3:47 PM

  • I upgraded my 3gs to ios5 and the sound of the messages is not working well, it's slow and my bluetooth definitions are not stable how can i get back to the ios4

    I upgraded my 3gs to ios5 and the sound of the messages is not working well, it's slow and my bluetooth definitions are not stable how can i get back to the ios4

    App Store->Purchased
    iTunes->Purchased->Download All

  • After doing last Mavericks update, Messages is not working properly

    Since yesterday, after doing last Mavericks update, Messages is not working properly - the Dock icon is not bouncing nor showing any number for new messages. Very annoying, since I usually have Messages on background while working and I now i don't realize if people is chatting me unless I open the messages wondows.

    Hi,
    Check System Preferences > Notification is set for Messages
    In Messages > Preferences > General Section change the Sound option for Message Received.
    Restart the app and test this sound is (still) playing.
    Place app in background an iMessages "yourself" form your iPhone.
    Does the sound Play ?
    10:18 pm      Wednesday; November 13, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • TS2755 the pic butten on messages is not working. can not send or recieve photos. please help.

    the pic butten on messages is not working. can not send or recieve photos. please help.

    Hi Beharley,
    try resetting your network settings: Settings - General - Reset - Reset Network Settings. This works fine if something is messed up with your carrier bundle.
    Regards, Peter

  • Fetch new mail messages does not work

    On my notebook the fetch new mail messages does not work
    Settings:
    - Fetch new messages:     every minute
    - Play sound Purr
    I need to us the manual button.
    On my imac it works fine with the same accounts

    My mail sounds are all screwed up. I hear the plane fly when I send an email but when I receive mail, no sound. I have rules set up which worked in Tiger. One rule is for mail to play a message "You have a message from "John Doe" when I receive an email from "John Doe" but it only plays when I send "John Doe" and email. Assbackwards.
    Sometimes when reading new mail, it just disappears. I have to click on it again. I find this version of email to be very flaky!
    Dave Brenneman

  • N8 - Messaging Shortcut not working

    nokia n8 - messaging shircut not working. Only conversations shortcut is working.

    Sounds like a hardware fault, 
    You'd need to take the phone to a nokia care point and let them take a look 

  • I just purchased myself an iPad.  I set it up and now my messages will not work on it.

    I need help restoring my messages to my iPad.

    The title of your post says "now my messages will not work".
    The text of your post says "need help restoring my messages".
    Doesn't make sense.
    Is this an iMessage problem or Mail problem?
     Cheers, Tom

  • How do I clear the message usage under settings to open ip more space on my phone?  Clearing the actual messages will not work.

    How do I clear the messages in order to free up storage space?  Just clearing the actual messages will not work!!!

    It doesn't sound like the Exchange environment is configured in a manner to support these types of clients very well.  Have your Exchange team look at the following
    http://blogs.technet.com/b/exchange/archive/2012/11/26/supporting-windows-8-mail-in-your-organization.aspx
    http://blogs.technet.com/b/exchange/archive/2013/10/18/supporting-windows-mail-8-1-in-your-organization.aspx
    From the latter article: "Communications applications can connect to a corporate Exchange service
    configured to require certificate-based authentication. User authentication certificates can be provisioned to Windows 8.1 devices by administrators or end-users can browse to certificate and install to user certificate storage."
    You might want to:
    Ask your Exchange team the public URLs (ExternalURL) for Exchange OWA & ActiveSync
    Open the OWA URL in your Internet Explorer from your Surface
    If you get a Certificate warning, open the certificate and select Install (NOTE: You may have to install the entire certificate chain).  Your desktop support team should be able to support this because it is the SAME process for standard Windows 8x
    desktops.
    Confirm that you can open OWA on your surface with no more certificate or security warnings.  NOTE: The Exchange team will have to configured OWA properly.
    Once confirmed, repeat the same steps for the activesync URL that they provided.
    When done, try using the OWA OR ActiveSync URL value in your settings of your Mail client.
    Good Luck

  • JavaScript alert() is not working in mozilla 19.0.2.Why?

    I have created a .aspx page in it i have added gew javascript function containing alert(). But niether the functions nor the alerts are invoking.why? i have created a javascript function on keypress event as:
    function isSpaceKey(evt) {
    // debugger;
    var charCode = (evt.which) ? evt.which : event.keyCode
    if ((charCode < 47 || charCode > 57) && charCode != 8) {
    alert("Enter Numeral Values only!");
    return false;
    return true;
    and added validation summary in .aspx page enabling its message box if user validation fails . But it is also not working. Before using Firefox i was using IE on which it was working fine. What is the problem? Thanks.

    See:
    *https://developer.mozilla.org/en-US/docs/Web/API/event.which

Maybe you are looking for

  • How do I delete duplicate photos from my iPhone 6?

    I have double the amount of pictures on my iPhone 6, which I actually should have. (Over 11,000). I did have "save original photo" with HDR off but have since turned it off. When I synced via iTunes with iPhoto Libray a couple weeks ago, somehow the

  • HT1420 Can you have more than one device with a different Apple ID authourized to the same computer

    Can you have more than one device with a different Apple ID authourized to the same computer

  • Display Error Message in I Expense Page as Hyperlink

    Hi All, I want to show oracle apps custom message in oaf i expense page.In fact I am able to do that with built in Ap_Web_Utilities_Pkg.AddExpErrorNotEncoded. Ex: Ap_Web_Utilities_Pkg.AddExpErrorNotEncoded(p_message_array,l_clerr,Ap_Web_Utilities_Pkg

  • Adobe Media Encoder Question

    Hey everyone! So I just switched from using AE CS5.5 to AE CC, which now has me use the Media Encoder to render all my files, which frankly is AWESOME. However, I sometimes like to render out a piece of a long video I'm editing so I can get a glimpse

  • Blinking Screen for MB Pro 17 inches

    My configuration is 17 inches 2010 MB Pro with i7 chip Non Glare screen 8 Gigs of RAM Ever since I got it, I am observing sone annoying screen flashing. At some point I thought it was one of those visual alerts for handicapped, but after checking all