Spectrum Scale User Group: What's new in Spectrum Scale 5.1?
November 18,2020
11:00 AM - 12:30 PM EST
If you have any questions regarding the event please send an e-mail to:
sonali.bhide@ibm.com
var userLang = window.navigator.language;
var rf_cm_mmc;
var rf_cm_mmca1;
var rf_cm_mmca2;
var rf_cm_mmca3;
function createElement(name,id,value,type){
var input = document.createElement("input")
input.setAttribute("type", type)
input.setAttribute("name", name)
input.setAttribute("value", value)
input.setAttribute("id", id)
return input
}
// V9
var INTERVAL_DELAY = 100;
var MAX_INTERVAL_ITERATIONS = 100; // 10s at 100ms intervals
var FORM_ID = 'myDynamicForm';
var rfLocale = window.rfLocale || { lang: 'en', region: 'US' };
var dlTimerIterations = 0;
var dlTimer = window.setInterval(function () {
// window.dl will be blocked by ad blockers and
// is not guaranteed to exist.
if (window.dl && window.dl.fn) {
rf_cm_mmc = dl.fn.getCampInfo().cm_mmc;
rf_cm_mmca1 = dl.fn.getCampInfo().cm_mmca1;
rf_cm_mmca2 = dl.fn.getCampInfo().cm_mmca2;
rf_cm_mmca3 = dl.fn.getCampInfo().cm_mmca3;
window.clearInterval(dlTimer);
}
if (dlTimerIterations >= MAX_INTERVAL_ITERATIONS) {
// Safety net to ensure this interval won't run forever.
window.clearInterval(dlTimer);
}
dlTimerIterations++;
}, INTERVAL_DELAY);
function setNativeValue(element, value) {
var valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set;
var prototype = Object.getPrototypeOf(element);
var prototypeValueSetter = Object.getOwnPropertyDescriptor(
prototype,
'value'
).set;
if (valueSetter && valueSetter !== prototypeValueSetter) {
prototypeValueSetter.call(element, value);
} else {
valueSetter.call(element, value);
}
}
// IE does not support the Event constructor. We need this fallback.
function createEvent(eventName, eventOptions) {
if (typeof Event === 'function') {
// This is a modern browser that supports the Event constructor.
return new Event(eventName, eventOptions)
} else {
// This is IE :(.
var event = document.createEvent('Event')
event.initEvent(eventName, eventOptions.bubbles, eventOptions.cancelable, eventOptions.detail)
return event
}
}
function runNoticeChoice() {
var noticeChoiceDiv = document.createElement('div');
noticeChoiceDiv.setAttribute('id', 'noticeChoiceId');
$('.form-footer-actions').before(noticeChoiceDiv);
var realContinueButton = $('#wf-btn-submit');
// This submit button is what will send form data to N&C.
var injectedSubmitButton = createElement('rfSubmit', 'rfSubmit', 'Submit', 'submit');
$('#' + FORM_ID).append(injectedSubmitButton);
$(injectedSubmitButton).css('display', 'none');
var $NC_HIDDEN_EMAIL_FIELD = $('#15724979646720018TC7');
$NC_HIDDEN_EMAIL_FIELD.parent().css('display', 'none');
var $NC_HIDDEN_PHONE_FIELD = $('#1572498016288001blca');
$NC_HIDDEN_PHONE_FIELD.parent().css('display', 'none');
//VCPI
var $CM_MMC_HIDDEN0 = $('#1572449484696001b9Y8');
$CM_MMC_HIDDEN0.parent().css('display', 'none');
var $CM_MMC_HIDDEN1 = $('#1572449642433001bMIM');
$CM_MMC_HIDDEN1.parent().css('display', 'none');
var $CM_MMC_HIDDEN2 = $('#15724497526980018kZ3');
$CM_MMC_HIDDEN2.parent().css('display', 'none');
var $CM_MMC_HIDDEN3 = $('#1572449788449001jL4l');
$CM_MMC_HIDDEN3.parent().css('display', 'none');
//END VCPI
realContinueButton.on('click', function (e) {
injectedSubmitButton.dispatchEvent(createEvent('click', { bubbles: true }));
// As we change these input values, we also need to dispatch an 'input'
// event so that nodes up the dom can react to the value change accordingly.
// It is also important that "bubbles" is set to true.
var input;
var hiddenEmailValue = $('#NC_HIDDEN_EMAIL').val()
if (hiddenEmailValue) {
input = $NC_HIDDEN_EMAIL_FIELD[0];
setNativeValue(input, hiddenEmailValue);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
var hiddenPhoneValue = $('#NC_HIDDEN_PHONE').val()
if (hiddenPhoneValue) {
input = $NC_HIDDEN_PHONE_FIELD[0];
setNativeValue(input, hiddenPhoneValue);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
// VCPI
if (rf_cm_mmc) {
input = $CM_MMC_HIDDEN0[0];
setNativeValue(input, rf_cm_mmc);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
if (rf_cm_mmca1) {
input = $CM_MMC_HIDDEN1[0];
setNativeValue(input, rf_cm_mmca1);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
if (rf_cm_mmca2) {
input = $CM_MMC_HIDDEN2[0];
setNativeValue(input, rf_cm_mmca2);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
if (rf_cm_mmca3) {
input = $CM_MMC_HIDDEN3[0];
setNativeValue(input, rf_cm_mmca3);
input.dispatchEvent(createEvent('input', { bubbles: true }));
}
// END VCPI
})
var options = {
id: {
form: FORM_ID,
email: 'formAttendee-email',
privacyDiv: 'noticeChoiceId',
country: 'formAttendee-countryId',
customButton: 'rfSubmit',
},
// IBM expects the defaultcountry to be in the reverse order of the browser api
// i.e. {country}-{lang} rather than {lang-country}
// They also need country to be lower-case.
defaultcountry: (rfLocale.region + '-' + rfLocale.lang).toLowerCase(),
questionType: '4',
questionChoice: '1,2',
pageDesc: '',
offerCode: '',
dcSubject: '',
granular: 'off',
footer: 'off',
preferenceareas: '',
trial: '',
Submit: 'false',
SaveToGECS: 'true',
};
window.noticeJQuery.noticeandchoice(options);
}
if (data.page === 'contactInfo' || data.page === 'createaccount') {
var noticeChoiceTimerIterations = 0;
var noticeChoiceTimer = window.setInterval(function () {
if (document.getElementById(FORM_ID)) {
runNoticeChoice();
window.clearInterval(noticeChoiceTimer);
}
if (noticeChoiceTimerIterations >= MAX_INTERVAL_ITERATIONS) {
// Safety net to ensure this interval won't run forever.
window.clearInterval(noticeChoiceTimer);
}
noticeChoiceTimerIterations++;
}, INTERVAL_DELAY);
}
function appendScript(url){
var s = document.createElement("script");
s.type = "text/javascript";
s.src = url;
s.async = "true";
document.head.appendChild(s);
}
var str = eventCode;
var ep_id = str.toUpperCase();
var eventName = eventName;
var bUnit = "";
// V2
bUnit = data.event['1578604769236001V632'];
// Track when the registration form is loaded.
if(data.page === 'contactInfo' || data.page === 'createaccount') {
eventInfo = {
primaryCategory: 'EVENT REGISTRATION',
eventName: bUnit + eventName + 'seminar=' + ep_id,
type: 'conversion',
eventAction: '1'
};
ibmStats.event(eventInfo);
}
// Track when registration has completed.
if (data.page === 'regConfirm') {
eventInfo = {
primaryCategory: 'EVENT REGISTRATION',
eventName: bUnit + eventName + 'seminar=' + ep_id,
type: 'conversion',
eventAction: '2'
};
ibmStats.event(eventInfo);
}
console.log(data.event);
//page submit convtype 2 on N&C script due to custom btn fn