Alpha Video Training
Results 1 to 3 of 3

Thread: "Double Quotes" In A List Template Item Click Event

  1. #1
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,665

    Default "Double Quotes" In A List Template Item Click Event

    I've been struggling with what I think is a very useful list template method of displaying fields with an OnClick event in a defined item that calls the A5.msgBox.show() function.
    For illustration the method is set up like this: The CITY field has a defined template item called ShowCity. The OnClick event for the template item calls the A5.msgBoxShow() javascript event to display the contents of the city field in a popup window.

    List Layout Template.jpg Item Definition.jpg

    You can display the contents of a list field by clicking on it. The usefulness of this is for fields that contain more data than can be easily shown on the list itself, and unlike pop-up bubble help it doesn't disappear until you close the window. The problem I am having is where any text that follows a double-quote (") is not displayed.

    In case this is not very clear, I have attached a basic test case. The component is simple a list control based on static data. The city field is deliberately narrow such that not all of the text can be viewed. I've added a pop-up bubble help in the list onItemDraw event so if you hover over the city field you can see which fields have double-quotes. Now if you click any city field, you get the pop-up window. It will display the data correctly unless a double-quote is encountered.

    2. Bubble Help.jpg 3. Item Method Double Quotes.jpg

    If anyone wants to take a stab at it, I could use the help. I don't know if there is a way to javascript escape the double-quotes but I haven't had much luck yet. Its a pretty cool method.
    Attached Files Attached Files

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,760

    Default Re: "Double Quotes" In A List Template Item Click Event

    Unless I misunderstand, I think you're trying to solve a problem that you don't have. I'm not sure why you're using ia in your message.

    Using ia, the full City data is never getting through to the a5-item.

    If you use data.City you won't have an issue.

    Code:
    A5.msgBox.show('CITY','<div style="color: #f0f1f8 ;background-color: #4e5254; width: 5in; height: auto; padding: 15pt;">'+ data.City +'</div>',[{html: 'OK', value: 'ok'}],function(button) {if(button == 'ok') {
    setTimeout(function() {},10)
    }
    });

  3. #3
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON, Canada
    Posts
    1,665

    Default Re: "Double Quotes" In A List Template Item Click Event

    David, it's me who misunderstands, not you. I thought I had to use item arguments in the a5-item method.

    That works perfectly and is exactly what I am looking to do!

    Thanks once again for your assistance.

Similar Threads

  1. Next item to be in focus on "candepart" event.
    By Nick Oldfield in forum Alpha Five Version 10 - Desktop Applications
    Replies: 19
    Last Post: 03-20-2012, 08:21 PM
  2. Double Click Not Setting "Current Record"
    By michaelwpayton in forum Alpha Five Version 9 - Desktop Applications
    Replies: 25
    Last Post: 02-07-2009, 01:03 AM
  3. OK - I Give! Where's the "Double Click" Action?
    By eaglebqh in forum Alpha Five Version 8
    Replies: 10
    Last Post: 11-21-2007, 01:27 PM
  4. Is there way to do "double click" on a listbox
    By ktjia@ampmservice.com in forum Alpha Five Version 8
    Replies: 5
    Last Post: 10-25-2007, 07:56 PM
  5. List Box - Double Click Event?
    By jdtwright in forum Alpha Five Version 7
    Replies: 5
    Last Post: 02-21-2006, 11:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •