What you see is how you see it

Processing power may still be increasing rapidly, but what about the window into the soul of any computer system, namely the screen on which its information is viewed? LESLIE FAUGHNAN looks at emerging technologies in the area of electronic displays.

Never mind the 0–60 mph figures or the brake horsepower or the multilitre engine capacity—in the end it all depends on the few square inches of tyre rubber in contact with the road. From mopeds to Formula One cars, that’s the critical interface for vehicles.

With computers, the primary interface with the human brain that makes the darn things universally useful is the screen display. So quite rightly, the everyday PC user has welcomed the advances in technology that have brought us colour screens and then larger monitors and more recently flat LCD screens—with the promise of bigger and better to come. Never mind all those mega/gigahertz under the bonnet—what we can really understand and appreciate is what is displayed in front of us.

Some of our esteemed readers probably cannot remember the heady early days of WYSIWYG and the magic of seeing a document emerge from a printer (mono, or course) exactly as you intended it. ‘What
You See Is What You Get’ (wizzy-wig) was a giant step forward from lines of standard text or figures in flickering off-white on green or blue screens. That giant leap forward was arguably at least as
important for the growth of the PC into the ubiquitous engine of commerce and ‘infotainment’ (remember that one?) that it is today. In fact never mind all that Moore’s Law processing power: I’ll make a case any day for the three great drivers of personal computing so far as the Spreadsheet, the Colour Display and the World Wide Web.

 

advertisement

 

Meanwhile, back at our topic, display technology has permeated and empowered every corner of our business and social lives in the last couple of decades. It is growing all the time in range of applications as well as variety and sophistication of the technologies involved, from flat LCD screens on the desktop to 42in plasma-screen televisions, holographic and other 3D projections and lately to
the new magic of nanotechnology, flexible displays and digital ink.

Perhaps the two places where most business people are noticing advances in display technology are on the desktop, on their mobile phones and in boardrooms, presentations and conferences. Flat screens have advantages other than their sleek looks and slim profile, notably a flicker-free image with a wider angle of view without reflective glare.

Price was the principal obstacle for the initial few years, but today entry level 15in TFT (thin-film transistor) screens carry a price differential, when compared with traditional CRT monitors of
comparable size, that is easily absorbed by a complete PC bundle (CPU, screen, keyboard and mouse, possibly speakers). This is true even at competitive price levels in both business and consumer
marketplaces. Flat screens are also increasingly being sold separately as upgrades to existing PCs or simply because basic PCs, screens, peripherals and so on are commodities that are separately sourced at best available prices.

Presentations for the masses
Larger flat screens rise in price in proportion to the viewing area rather than the diagonal inch and there is still also the question of the manufacturing ‘yield’ of screens with minimal flawed pixels. So
general business users will probably baulk at the price of, say, 18in monitors and larger except for applications like control rooms, financial trading etc where screens may need to be (or can usefully
be) viewed by different people.

In fact that broad area of applications where the objective is to make computer information visible to numbers of people is probably the most rapidly growing in general business. So much so, in fact, that we really now have to make a distinction between monitors or screens for the individual user and those that are information displays driven by computer in applications from videoconferencing to education to advertising and marketing to transport service timetables/arrivals/departures. ‘Large panel displays are highly versatile because they can accept a range of inputs, digital or analogue,’ Danny Mulligan of Philips Electronics points out, ‘plus their physical neatness means they can be mounted or hung almost anywhere someone might want to display something. The content could be anything from a sports broadcast to an in-store commercial to computer-generated data.’

Popular applications for large displays often require multiple screens, either with identical information or unique information on each screen or specific groups. That whole new set of applications that uses displays as information resources for focussed or casual audiences brings in its train a new area of PC applications to control and feed the screen content. For such applications monitors can be ‘networked’ and individually or group addressed from a single server. Philips has a network product called Adtraxion, for example, so that all branches of a supermarket chain or a network of public transport stations, can be run from a single server at head office or anywhere that is convenient. Danny Mulligan says this can used to manage all aspects of the ‘play-list’ that will show on each screen. That might include both audio and video clips (commercials, product demonstrations, price and other information), live updates and so on as well as scheduling and presentation format, eg single image, picture in picture, multiple images, etc.

Niche applications
Irish company Zandar Technologies has made itself a major niche player over the past decade in professional broadcasting and other high end applications of multichannel, multi-image display control. It started in 1994 with technology for Irish and other TV cable companies that allowed mosaic (6-8 live small images on a single screen) displays and has since gone on to develop its MultiViewer
technology for a wide range of high level professional applications. Its prestigious clients worldwide include BBC, Canal+, CNN, ABC and Alfacam, Europe’s largest independent outside broadcast company.

Broadcasters may face the more obvious challenges of live feeds from multiple sources, but Zandar managing director Deirdre Smith points out that any business user of multiple images will encounter
problems because of the many different possible types of input.  ‘Taking advantage of today’s plasma and LCD screen technology offers great opportunities,’ she said, ‘but there are all the different data formats, digital and analogue, plus elements like the aspect ratio—standard, wide screen, even Cinemascope—colour quality control, different picture resolution and so on. In a busy broadcasting station control room, reconciling all of those elements for simultaneous display is a technically challenging task.’

But it is a task which Zandar has mastered, replacing banks of fixed monitors (mounted on heavy racking with problems of heat dissipation, cabling, etc) with multiple images on large flat screens.
Technically, Zandar’s products accept, recognise and convert all incoming signals for display and accurate pixel matching with minimal time delay and overcome the constraints of the display technology. ‘Our multiviewer technology was developed for the broadcast industry—which still leads the way—but is proving highly valuable in many command and control situations,’ says Deirdre Smith. ‘Security is an obvious application but there are also similar needs in utilities and telecoms, logistics, traffic, retailing and many more.

‘Taking advantage of the display real estate’ is how Deirdre Smith describes one of the aims of her company’s technology and the same impulse is clearly driving the increasing use of PC-controlled
display screens in business. Retailing is one very publicly visible area but corporate presentations of all kinds—from product launches to international conferences—are taking advantage of the possibilities opened up by high tech display solutions.

‘The most common solution today is a combination of rear projection for a really big image and then display panels for supporting images and detail,’ says Stuart Anderson, production manager of audiovisual company Avcom. ‘Today’s professional digital projectors give a crisp image at any size you could want indoors. The only constraint is that you need a lot of backstage space—say a bit over 10 feet for a 10ft screen, even using special lenses and smart short-throw technology, and pro rata after that. You can set the scene—in fact the big screen can become your set and be instantly changed—and
then smaller 42in or 50in LCD monitors can complement the information.’

In the realm of corporate presentations, many developments have occurred in recent years at the control level, mixing inputs—voice, music, computer graphics, text and video—and smoothly changing
between elements. ‘Production values are getting higher all the time,’ said Anderson. ‘Even the inevitable PowerPoint presentations are generally improving—the numbers of inputs are rising and eight channels would not be uncommon. What is magic is that you can control all of that on the spot using just a laptop, with the ability to change things on the fly or cope with problems. A classic one is the guest speaker who is late or whose material arrives barely in time.’

Another screen in the wall
A technology that is increasingly used for big displays where lighting or other conditions do not suit projection is the LED video wall. Much cruder than LCD, so that viewing distance starts at about 10m
or more, the neat trick with LED displays is that they can be built up to very large sizes (up to 80 sq m) using modules or ’tiles.’  They can be built also to show wide screen or even CinemaScope images
in any light conditions and can be used indoors or outdoors. Avcom has a specialist sister company ShowBiz in the UK with a dedicated mobile truck and the ability to mount a large LED video display
almost anywhere in a matter of hours.

How big can a display screen get?  Plasma and LCD screens are currently at 42in as standard, with 50in models available and becoming more common; 60in screens are already on the market but their popularity is constrained by price and supply. Avcom’s Stuart Anderson points out that in a normal room or on an exhibition stand, for instance, anything much above the 42in can be too dominant and in any event the audience has to stand back a bit to view the image properly. All of the vendors offer technology to gang up flat screens in 2×2 or 3×3 configurations for a larger single image or multiple pictures as required. The inevitable blank/black strips where the frames meet are not usually regarded as taking from the effect—this is not for sustained viewing or movie watching. NEC has its
PlasmaSync technology, for one example, that links High Definition plasma screens into a 183in video wall.

As manufacturing technology improves (higher yields of ‘perfect’ screens) and competition and supply drive prices down, we can expect to see a range of quality LCD displays from 5in and 7in up to 60in so that business users and consumers simply choose the appropriate size for the purpose. For example, the Liceu theatre in Barcelona has, in common with many European opera houses of its vintage, a problem for today’s audiences with too many seats having restricted sight lines. So these seats are now equipped with 7in fold-out displays relaying the stage action in full colour. But the same theatre also uses large 50in plasma screens to whet the appetites of ticket seekers in the foyer and also off-stage (discreetly) to relay the conductor’s image live to the performers. We are already seeing the spread of larger panels in supermarkets to help promote products, so perhaps some enterprising (and brave) retailer will think of putting small screens directly on trolleys and beside goods on shelves.

In the computing world, what we are effectively seeing is the final decoupling of the device or data source from the display. On the one hand, engineering and design no longer have to match the unit to all the available types and sizes of display; on the other, any digital device can drive any screen. A PDA can feed to an 80 sq m video wall, or full motion video can, as lucky owners know, be shown on a pocket screen.

An extra dimension
But so far we have dealt only with two-dimensional displays. Holograms and three-dimensional displays and projection are probably some years from being widespread or commercially available but prototypes are already being used at trade fairs and public events where the slightly crude 3D images are nevertheless exerting an inevitable fascination on their audiences. So far these displays are limited to still photos and computer graphics, because the image has to be captured or rendered in 3D in the first place. So real 3D movies ‘in the round’ are quite some way off. On the other hand, three-dimensional viewing (as with 3D modelling in engineering and architecture) can be enormously valuable and in the medical and scientific area much progress is being made.

Siemens has launched what it calls ‘medical grade Extreme 3D Display’ or X3D in an 18in model which does not require special glasses or other viewing aids and can serve several observers at once. The benefits of 3D apply to all modern medical imaging including angiography, tomography, ultrasound and MRI and are said to include better diagnosis and more successful planning of interventional procedures and operations. 

Another intriguing line of development, still in its early stages, is being pursued by Illinois company iO2 Technology. It has demonstrated the projection of 3D images in mid-air in a darkened room with just the Heliodisplay projector and no screen or other display apparatus. Understandably secretive about the details of the technology, iO2 just discloses that the air in the image display space is ‘modified’ which suggests ionizing or electrically charging particles or molecules. The images are 2D (although any of the computer graphics techniques to simulate 3D can be used) and any current video standard can be input, including full motion video. Extraordinarily, the Heliodisplay is interactive, like a virtual touchscreen, and a hand or finger can act as a mouse. (www.io2technology.com).

Ever heard of ‘nanochromics’? Well, remember where you heard it first and keep an eye on young Dublin company nTera, a rising star in nanotechnology and not just by Irish standards. Founded in
1997, NTERA has developed using state-of–the-art patented nanostructured materials a next generation display technology called NanoChromics Displays (NCD). It is said to offer unrivalled appearance, performance and cost effectiveness over existing LCD and other display technologies.

Currently at a high resolution 200dot/in, NCDs offer an 18:1 contrast ratio (ink on paper is just 6:1) and are viewable in any light conditions from any angle. A hugely significant factor here, although not directly related to the ‘nanotech’ nature of NCDs, is that the displays are by their nature extremely thin and have both low-energy and low-voltage requrements.
 
‘We are working with international partners on commercialisation,’ says nTera Marketing Manager Padraic Marren, who also confirmed that the early applications are likely to be in the areas of mobile
phones, PDAs and special-purpose devices needing low-cost, low energy mono displays. In such cases, the technical features of the NCDs are immediately valuable to the manufacturers, eg making use of the fact that power is only required when the display information changes such as in clocks and watches, meters of various kinds and medical devices.

Padraic Marren suggests that it will probably be the end of 2005 before NCD technology appears on the market in live full-colour video displays that compete with flat-panel LCD technology. He also suggests that: ‘Flexible displays on low-cost substrates are one of the most exciting possibilities offered by NCD technology and in any event large full-colour ultra-thin displays are possible by tiling units up to almost any size required.’

That opens up the science fiction possibility of true video wall technology—TV screen as wallpaper! In this potentially vast new field of display technology—LCD, plasma, NCD, holographic and other 3D projection—only one thing is really clear about the future: We ain’t seen nothing yet!

20/09/04

RELATED ARTICLES
#mc_embed_signup{background:#fff; false;clear:left; font:14px Helvetica,Arial,sans-serif; width: px;} /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
Sign up for the
Technology Minute
(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='MMERGE2';ftypes[2]='text';fnames[3]='MMERGE3';ftypes[3]='text';fnames[4]='MMERGE4';ftypes[4]='text';fnames[5]='SIGNUP';ftypes[5]='text';fnames[6]='MMERGE6';ftypes[6]='imageurl';}(jQuery));var $mcj = jQuery.noConflict(true); // SMS Phone Multi-Country Functionality if(!window.MC) { window.MC = {}; } window.MC.smsPhoneData = { defaultCountryCode: 'IE', programs: [], smsProgramDataCountryNames: [] }; function getCountryUnicodeFlag(countryCode) { return countryCode.toUpperCase().replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397)) }; // HTML sanitization function to prevent XSS function sanitizeHtml(str) { if (typeof str !== 'string') return ''; return str .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, ''') .replace(/\//g, '/'); } // URL sanitization function to prevent javascript: and data: URLs function sanitizeUrl(url) { if (typeof url !== 'string') return ''; const trimmedUrl = url.trim().toLowerCase(); if (trimmedUrl.startsWith('javascript:') || trimmedUrl.startsWith('data:') || trimmedUrl.startsWith('vbscript:')) { return '#'; } return url; } const getBrowserLanguage = () => { if (!window?.navigator?.language?.split('-')[1]) { return window?.navigator?.language?.toUpperCase(); } return window?.navigator?.language?.split('-')[1]; }; // getBrowserLanguageCode() and getSmsProgramForCountryAndLanguage() are provided globally // by the external mc-sms-phone.js script loaded alongside this inline form script. function getDefaultCountryProgram(defaultCountryCode, smsProgramData) { if (!smsProgramData || smsProgramData.length === 0) { return null; } var browserCountryCode = getBrowserLanguage(); var browserLangCode = getBrowserLanguageCode(); if (browserCountryCode) { var match = getSmsProgramForCountryAndLanguage(smsProgramData, browserCountryCode, browserLangCode); if (match) { return match; } } if (defaultCountryCode) { var match = getSmsProgramForCountryAndLanguage(smsProgramData, defaultCountryCode, browserLangCode); if (match) { return match; } } return smsProgramData[0]; } function updateSmsLegalText(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } var programs = window?.MC?.smsPhoneData?.programs; if (!programs || !Array.isArray(programs)) { return; } var browserLangCode = getBrowserLanguageCode(); var program = getSmsProgramForCountryAndLanguage(programs, countryCode, browserLangCode); if (!program || !program.requiredTemplate) { return; } var smsConsentHtmlRenderingFixEnabled = true; const legalTextElement = document.querySelector('#legal-text-' + fieldName); if (!legalTextElement) { return; } const divRegex = new RegExp(']*>', 'gi'); const blockWrapperRegex = new RegExp(']*>', 'gi'); const fullAnchorRegex = new RegExp('<a.*?', 'g'); const anchorRegex = new RegExp('(.*?)'); const template = smsConsentHtmlRenderingFixEnabled ? program.requiredTemplate .replace(/\s*

]*>/gi, ' ') .replace(blockWrapperRegex, '') : program.requiredTemplate.replace(divRegex, ''); legalTextElement.textContent = ''; const parts = template.split(/(.*?)/g); parts.forEach(function(part) { if (!part) { return; } const anchorMatch = part.match(/(.+?)/); if (anchorMatch) { const linkElement = document.createElement('a'); linkElement.href = sanitizeUrl(anchorMatch[1]); linkElement.target = anchorMatch[2] ? sanitizeHtml(anchorMatch[2]) : '_blank'; linkElement.rel = 'noopener noreferrer'; linkElement.textContent = sanitizeHtml(anchorMatch[3]); legalTextElement.appendChild(linkElement); } else { legalTextElement.appendChild(document.createTextNode(part)); } }); } function generateDropdownOptions(smsProgramData) { if (!smsProgramData || smsProgramData.length === 0) { return ''; } var programs = true ? smsProgramData.filter(function(p, i, arr) { return arr.findIndex(function(q) { return q.countryCode === p.countryCode; }) === i; }) : smsProgramData; return programs.map(program => { const flag = getCountryUnicodeFlag(program.countryCode); const countryName = getCountryName(program.countryCode); const callingCode = program.countryCallingCode || ''; // Sanitize all values to prevent XSS const sanitizedCountryCode = sanitizeHtml(program.countryCode || ''); const sanitizedCountryName = sanitizeHtml(countryName || ''); const sanitizedCallingCode = sanitizeHtml(callingCode || ''); return '' + sanitizedCountryName + ' ' + sanitizedCallingCode + ''; }).join(''); } function getCountryName(countryCode) { if (window.MC?.smsPhoneData?.smsProgramDataCountryNames && Array.isArray(window.MC.smsPhoneData.smsProgramDataCountryNames)) { for (let i = 0; i < window.MC.smsPhoneData.smsProgramDataCountryNames.length; i++) { if (window.MC.smsPhoneData.smsProgramDataCountryNames[i].code === countryCode) { return window.MC.smsPhoneData.smsProgramDataCountryNames[i].name; } } } return countryCode; } function getDefaultPlaceholder(countryCode) { if (!countryCode || typeof countryCode !== 'string') { return '+1 000 000 0000'; // Default US placeholder } var mockPlaceholders = [ { countryCode: 'US', placeholder: '+1 000 000 0000', helpText: 'Include the US country code +1 before the phone number', }, { countryCode: 'GB', placeholder: '+44 0000 000000', helpText: 'Include the GB country code +44 before the phone number', }, { countryCode: 'CA', placeholder: '+1 000 000 0000', helpText: 'Include the CA country code +1 before the phone number', }, { countryCode: 'AU', placeholder: '+61 000 000 000', helpText: 'Include the AU country code +61 before the phone number', }, { countryCode: 'DE', placeholder: '+49 000 0000000', helpText: 'Fügen Sie vor der Telefonnummer die DE-Ländervorwahl +49 ein', }, { countryCode: 'FR', placeholder: '+33 0 00 00 00 00', helpText: 'Incluez le code pays FR +33 avant le numéro de téléphone', }, { countryCode: 'ES', placeholder: '+34 000 000 000', helpText: 'Incluya el código de país ES +34 antes del número de teléfono', }, { countryCode: 'NL', placeholder: '+31 0 00000000', helpText: 'Voeg de NL-landcode +31 toe vóór het telefoonnummer', }, { countryCode: 'BE', placeholder: '+32 000 00 00 00', helpText: 'Incluez le code pays BE +32 avant le numéro de téléphone', }, { countryCode: 'CH', placeholder: '+41 00 000 00 00', helpText: 'Fügen Sie vor der Telefonnummer die CH-Ländervorwahl +41 ein', }, { countryCode: 'AT', placeholder: '+43 000 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die AT-Ländervorwahl +43 ein', }, { countryCode: 'IE', placeholder: '+353 00 000 0000', helpText: 'Include the IE country code +353 before the phone number', }, { countryCode: 'IT', placeholder: '+39 000 000 0000', helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono', }, { countryCode: 'NO', placeholder: '+47 000 00 000', helpText: 'Inkluder NO landskode +47 før telefonnummeret', }, { countryCode: 'SE', placeholder: '+46 00 000 00 00', helpText: 'Inkludera SE landskod +46 före telefonnumret', }, { countryCode: 'DK', placeholder: '+45 00 00 00 00', helpText: 'Inkluder DK landekode +45 før telefonnummeret', }, { countryCode: 'FI', placeholder: '+358 00 000 0000', helpText: 'Sisällytä FI-maakoodi +358 ennen puhelinnumeroa', }, { countryCode: 'EE', placeholder: '+372 0000 0000', helpText: 'Lisage EE riigikood +372 telefoninumbri ette', }, { countryCode: 'PL', placeholder: '+48 000 000 000', helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu', }, { countryCode: 'SK', placeholder: '+421 000 000 000', helpText: 'Pred telefónne číslo uveďte kód krajiny SK +421', }, { countryCode: 'LV', placeholder: '+371 0000 0000', helpText: 'Iekļaujiet LV valsts kodu +371 pirms tālruņa numura', }, { countryCode: 'LT', placeholder: '+370 0000 0000', helpText: 'Įtraukite LT šalies kodą +370 prieš telefono numerį', }, { countryCode: 'GR', placeholder: '+30 000 000 0000', helpText: 'Συμπεριλάβετε τον κωδικό χώρας GR +30 πριν από τον αριθμό τηλεφώνου', }, { countryCode: 'PT', placeholder: '+351 000 000 000', helpText: 'Inclua o código de país PT +351 antes do número de telefone', }, { countryCode: 'HR', placeholder: '+385 00 000 0000', helpText: 'Uključite HR pozivni broj države +385 prije telefonskog broja', }, { countryCode: 'SI', placeholder: '+386 00 000 000', helpText: 'Vključite SI kodo države +386 pred telefonsko številko', }, { countryCode: 'IS', placeholder: '+354 000 0000', helpText: 'Láttu IS landsnúmer +354 fylgja á undan símanúmerinu', }, { countryCode: 'LU', placeholder: '+352 000 000 000', helpText: 'Incluez le code pays LU +352 avant le numéro de téléphone', }, { countryCode: 'MC', placeholder: '+377 00 00 00 00', helpText: 'Incluez le code pays MC +377 avant le numéro de téléphone', }, { countryCode: 'AD', placeholder: '+376 000 000', helpText: 'Incloeu el codi de país AD +376 abans del número de telèfon', }, { countryCode: 'JE', placeholder: '+44 0000 000000', helpText: 'Include the JE country code +44 before the phone number', }, { countryCode: 'IM', placeholder: '+44 0000 000000', helpText: 'Include the IM country code +44 before the phone number', }, { countryCode: 'GG', placeholder: '+44 0000 000000', helpText: 'Include the GG country code +44 before the phone number', }, { countryCode: 'AL', placeholder: '+355 00 000 0000', helpText: 'Përfshini kodin e vendit AL +355 para numrit të telefonit', }, { countryCode: 'SM', placeholder: '+378 0000 000000', helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono', }, { countryCode: 'FO', placeholder: '+298 000000', helpText: 'Inkluder FO landekode +298 før telefonnummeret', }, { countryCode: 'MT', placeholder: '+356 0000 0000', helpText: 'Include the MT country code +356 before the phone number', }, { countryCode: 'LI', placeholder: '+423 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die LI-Ländervorwahl +423 ein', }, { countryCode: 'GI', placeholder: '+350 000 00000', helpText: 'Include the GI country code +350 before the phone number', }, { countryCode: 'MD', placeholder: '+373 00 000 000', helpText: 'Includeți codul de țară MD +373 înaintea numărului de telefon', }, { countryCode: 'HU', placeholder: '+36 00 000 0000', helpText: 'A telefonszám előtt adja meg a HU országkódot +36', }, { countryCode: 'NZ', placeholder: '+64 00 000 0000', helpText: 'Include the NZ country code +64 before the phone number', }, { countryCode: 'ME', placeholder: '+382 00 000 000', helpText: 'Uključite ME pozivni broj države +382 prije telefonskog broja', }, ]; const selectedPlaceholder = mockPlaceholders.find(function(item) { return item && item.countryCode === countryCode; }); return selectedPlaceholder ? selectedPlaceholder.placeholder : mockPlaceholders[0].placeholder; } function updatePlaceholder(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } const phoneInput = document.querySelector('#mce-' + fieldName); if (!phoneInput) { return; } const placeholder = getDefaultPlaceholder(countryCode); if (placeholder) { phoneInput.placeholder = placeholder; } } function updateCountryCodeInstruction(countryCode, fieldName) { updatePlaceholder(countryCode, fieldName); } function getDefaultHelpText(countryCode) { var mockPlaceholders = [ { countryCode: 'US', placeholder: '+1 000 000 0000', helpText: 'Include the US country code +1 before the phone number', }, { countryCode: 'GB', placeholder: '+44 0000 000000', helpText: 'Include the GB country code +44 before the phone number', }, { countryCode: 'CA', placeholder: '+1 000 000 0000', helpText: 'Include the CA country code +1 before the phone number', }, { countryCode: 'AU', placeholder: '+61 000 000 000', helpText: 'Include the AU country code +61 before the phone number', }, { countryCode: 'DE', placeholder: '+49 000 0000000', helpText: 'Fügen Sie vor der Telefonnummer die DE-Ländervorwahl +49 ein', }, { countryCode: 'FR', placeholder: '+33 0 00 00 00 00', helpText: 'Incluez le code pays FR +33 avant le numéro de téléphone', }, { countryCode: 'ES', placeholder: '+34 000 000 000', helpText: 'Incluya el código de país ES +34 antes del número de teléfono', }, { countryCode: 'NL', placeholder: '+31 0 00000000', helpText: 'Voeg de NL-landcode +31 toe vóór het telefoonnummer', }, { countryCode: 'BE', placeholder: '+32 000 00 00 00', helpText: 'Incluez le code pays BE +32 avant le numéro de téléphone', }, { countryCode: 'CH', placeholder: '+41 00 000 00 00', helpText: 'Fügen Sie vor der Telefonnummer die CH-Ländervorwahl +41 ein', }, { countryCode: 'AT', placeholder: '+43 000 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die AT-Ländervorwahl +43 ein', }, { countryCode: 'IE', placeholder: '+353 00 000 0000', helpText: 'Include the IE country code +353 before the phone number', }, { countryCode: 'IT', placeholder: '+39 000 000 0000', helpText: 'Includere il prefisso internazionale IT +39 prima del numero di telefono', }, { countryCode: 'NO', placeholder: '+47 000 00 000', helpText: 'Inkluder NO landskode +47 før telefonnummeret', }, { countryCode: 'SE', placeholder: '+46 00 000 00 00', helpText: 'Inkludera SE landskod +46 före telefonnumret', }, { countryCode: 'DK', placeholder: '+45 00 00 00 00', helpText: 'Inkluder DK landekode +45 før telefonnummeret', }, { countryCode: 'FI', placeholder: '+358 00 000 0000', helpText: 'Sisällytä FI-maakoodi +358 ennen puhelinnumeroa', }, { countryCode: 'EE', placeholder: '+372 0000 0000', helpText: 'Lisage EE riigikood +372 telefoninumbri ette', }, { countryCode: 'PL', placeholder: '+48 000 000 000', helpText: 'Podaj numer kierunkowy PL +48 przed numerem telefonu', }, { countryCode: 'SK', placeholder: '+421 000 000 000', helpText: 'Pred telefónne číslo uveďte kód krajiny SK +421', }, { countryCode: 'LV', placeholder: '+371 0000 0000', helpText: 'Iekļaujiet LV valsts kodu +371 pirms tālruņa numura', }, { countryCode: 'LT', placeholder: '+370 0000 0000', helpText: 'Įtraukite LT šalies kodą +370 prieš telefono numerį', }, { countryCode: 'GR', placeholder: '+30 000 000 0000', helpText: 'Συμπεριλάβετε τον κωδικό χώρας GR +30 πριν από τον αριθμό τηλεφώνου', }, { countryCode: 'PT', placeholder: '+351 000 000 000', helpText: 'Inclua o código de país PT +351 antes do número de telefone', }, { countryCode: 'HR', placeholder: '+385 00 000 0000', helpText: 'Uključite HR pozivni broj države +385 prije telefonskog broja', }, { countryCode: 'SI', placeholder: '+386 00 000 000', helpText: 'Vključite SI kodo države +386 pred telefonsko številko', }, { countryCode: 'IS', placeholder: '+354 000 0000', helpText: 'Láttu IS landsnúmer +354 fylgja á undan símanúmerinu', }, { countryCode: 'LU', placeholder: '+352 000 000 000', helpText: 'Incluez le code pays LU +352 avant le numéro de téléphone', }, { countryCode: 'MC', placeholder: '+377 00 00 00 00', helpText: 'Incluez le code pays MC +377 avant le numéro de téléphone', }, { countryCode: 'AD', placeholder: '+376 000 000', helpText: 'Incloeu el codi de país AD +376 abans del número de telèfon', }, { countryCode: 'JE', placeholder: '+44 0000 000000', helpText: 'Include the JE country code +44 before the phone number', }, { countryCode: 'IM', placeholder: '+44 0000 000000', helpText: 'Include the IM country code +44 before the phone number', }, { countryCode: 'GG', placeholder: '+44 0000 000000', helpText: 'Include the GG country code +44 before the phone number', }, { countryCode: 'AL', placeholder: '+355 00 000 0000', helpText: 'Përfshini kodin e vendit AL +355 para numrit të telefonit', }, { countryCode: 'SM', placeholder: '+378 0000 000000', helpText: 'Includere il prefisso internazionale SM +378 prima del numero di telefono', }, { countryCode: 'FO', placeholder: '+298 000000', helpText: 'Inkluder FO landekode +298 før telefonnummeret', }, { countryCode: 'MT', placeholder: '+356 0000 0000', helpText: 'Include the MT country code +356 before the phone number', }, { countryCode: 'LI', placeholder: '+423 000 0000', helpText: 'Fügen Sie vor der Telefonnummer die LI-Ländervorwahl +423 ein', }, { countryCode: 'GI', placeholder: '+350 000 00000', helpText: 'Include the GI country code +350 before the phone number', }, { countryCode: 'MD', placeholder: '+373 00 000 000', helpText: 'Includeți codul de țară MD +373 înaintea numărului de telefon', }, { countryCode: 'HU', placeholder: '+36 00 000 0000', helpText: 'A telefonszám előtt adja meg a HU országkódot +36', }, { countryCode: 'NZ', placeholder: '+64 00 000 0000', helpText: 'Include the NZ country code +64 before the phone number', }, { countryCode: 'ME', placeholder: '+382 00 000 000', helpText: 'Uključite ME pozivni broj države +382 prije telefonskog broja', }, ]; if (!countryCode || typeof countryCode !== 'string') { return mockPlaceholders[0].helpText; } const selectedHelpText = mockPlaceholders.find(function(item) { return item && item.countryCode === countryCode; }); return selectedHelpText ? selectedHelpText.helpText : mockPlaceholders[0].helpText; } function setDefaultHelpText(countryCode) { const helpTextSpan = document.querySelector('#help-text'); if (!helpTextSpan) { return; } } function updateHelpTextCountryCode(countryCode, fieldName) { if (!countryCode || !fieldName) { return; } setDefaultHelpText(countryCode); } function initializeSmsPhoneDropdown(fieldName) { if (!fieldName || typeof fieldName !== 'string') { return; } const dropdown = document.querySelector('#country-select-' + fieldName); const displayFlag = document.querySelector('#flag-display-' + fieldName); if (!dropdown || !displayFlag) { return; } const smsPhoneData = window.MC?.smsPhoneData; if (smsPhoneData && smsPhoneData.programs && Array.isArray(smsPhoneData.programs)) { dropdown.innerHTML = generateDropdownOptions(smsPhoneData.programs); } const defaultProgram = getDefaultCountryProgram(smsPhoneData?.defaultCountryCode, smsPhoneData?.programs); if (defaultProgram && defaultProgram.countryCode) { dropdown.value = defaultProgram.countryCode; const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName); if (flagSpan) { flagSpan.textContent = getCountryUnicodeFlag(defaultProgram.countryCode); flagSpan.setAttribute('aria-label', sanitizeHtml(defaultProgram.countryCode) + ' flag'); } updateSmsLegalText(defaultProgram.countryCode, fieldName); updatePlaceholder(defaultProgram.countryCode, fieldName); updateCountryCodeInstruction(defaultProgram.countryCode, fieldName); } var smsNotRequiredRemoveCountryCodeEnabled = true; var smsField = Object.values({"EMAIL":{"name":"EMAIL","label":"Email Address","helper_text":"","type":"email","required":true,"audience_field_name":"Email Address","merge_id":0,"help_text_enabled":false,"enabled":true,"order":0,"field_type":"merge"},"FNAME":{"name":"FNAME","label":"First Name","helper_text":"","type":"text","required":false,"audience_field_name":"First Name","enabled":false,"order":null,"field_type":"merge","merge_id":1},"MMERGE2":{"name":"MMERGE2","label":"Second Name","helper_text":"","type":"text","required":false,"audience_field_name":"Second Name","enabled":false,"order":null,"field_type":"merge","merge_id":2},"MMERGE3":{"name":"MMERGE3","label":"Company Name","helper_text":"","type":"text","required":false,"audience_field_name":"Company Name","enabled":false,"order":null,"field_type":"merge","merge_id":3},"MMERGE4":{"name":"MMERGE4","label":"Job Title","helper_text":"","type":"text","required":false,"audience_field_name":"Job Title","enabled":false,"order":null,"field_type":"merge","merge_id":4},"SIGNUP":{"name":"SIGNUP","label":"Signup form location","helper_text":"","type":"text","required":false,"audience_field_name":"Signup form location","enabled":false,"order":null,"field_type":"merge","merge_id":5},"MMERGE6":{"name":"MMERGE6","label":"Image URL","helper_text":"","type":"imageurl","required":false,"audience_field_name":"Image URL","enabled":false,"order":null,"field_type":"merge","merge_id":6}}).find(function(f) { return f.name === fieldName && f.type === 'smsphone'; }); var isRequired = smsField ? smsField.required : false; var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true; var phoneInput = document.querySelector('#mce-' + fieldName); if (phoneInput && defaultProgram.countryCallingCode && shouldAppendCountryCode) { phoneInput.value = defaultProgram.countryCallingCode; } displayFlag?.addEventListener('click', function(e) { dropdown.focus(); }); dropdown?.addEventListener('change', function() { const selectedCountry = this.value; if (!selectedCountry || typeof selectedCountry !== 'string') { return; } const flagSpan = displayFlag?.querySelector('#flag-emoji-' + fieldName); if (flagSpan) { flagSpan.textContent = getCountryUnicodeFlag(selectedCountry); flagSpan.setAttribute('aria-label', sanitizeHtml(selectedCountry) + ' flag'); } const selectedProgram = window.MC?.smsPhoneData?.programs.find(function(program) { return program && program.countryCode === selectedCountry; }); var smsNotRequiredRemoveCountryCodeEnabled = true; var smsField = Object.values({"EMAIL":{"name":"EMAIL","label":"Email Address","helper_text":"","type":"email","required":true,"audience_field_name":"Email Address","merge_id":0,"help_text_enabled":false,"enabled":true,"order":0,"field_type":"merge"},"FNAME":{"name":"FNAME","label":"First Name","helper_text":"","type":"text","required":false,"audience_field_name":"First Name","enabled":false,"order":null,"field_type":"merge","merge_id":1},"MMERGE2":{"name":"MMERGE2","label":"Second Name","helper_text":"","type":"text","required":false,"audience_field_name":"Second Name","enabled":false,"order":null,"field_type":"merge","merge_id":2},"MMERGE3":{"name":"MMERGE3","label":"Company Name","helper_text":"","type":"text","required":false,"audience_field_name":"Company Name","enabled":false,"order":null,"field_type":"merge","merge_id":3},"MMERGE4":{"name":"MMERGE4","label":"Job Title","helper_text":"","type":"text","required":false,"audience_field_name":"Job Title","enabled":false,"order":null,"field_type":"merge","merge_id":4},"SIGNUP":{"name":"SIGNUP","label":"Signup form location","helper_text":"","type":"text","required":false,"audience_field_name":"Signup form location","enabled":false,"order":null,"field_type":"merge","merge_id":5},"MMERGE6":{"name":"MMERGE6","label":"Image URL","helper_text":"","type":"imageurl","required":false,"audience_field_name":"Image URL","enabled":false,"order":null,"field_type":"merge","merge_id":6}}).find(function(f) { return f.name === fieldName && f.type === 'smsphone'; }); var isRequired = smsField ? smsField.required : false; var shouldAppendCountryCode = smsNotRequiredRemoveCountryCodeEnabled ? isRequired : true; var phoneInput = document.querySelector('#mce-' + fieldName); if (phoneInput && selectedProgram.countryCallingCode && shouldAppendCountryCode) { phoneInput.value = selectedProgram.countryCallingCode; } updateSmsLegalText(selectedCountry, fieldName); updatePlaceholder(selectedCountry, fieldName); updateCountryCodeInstruction(selectedCountry, fieldName); }); } document.addEventListener('DOMContentLoaded', function() { const smsPhoneFields = document.querySelectorAll('[id^="country-select-"]'); smsPhoneFields.forEach(function(dropdown) { const fieldName = dropdown?.id.replace('country-select-', ''); initializeSmsPhoneDropdown(fieldName); }); });

- Advertisment -

Most Popular