White Paper: Top 10 Must-Knows For FMCSA Compliance

When it comes to safety and compliance on the roads, PCF Insurance stands tall as a leader in insurance, risk management and loss control with a team of professionals who specialize in all things trucking and transportation. Get the top 10 tips from PCF Insurance on how to stay compliant with the Federal Motor Carrier Safety Administration (FMCSA).

#myIframe {
height: 1020px !important;
}
@media (min-width: 768px) {
#myIframe {
height: 980px !important;
}
}
@media (min-width: 1024px) {
#myIframe {
height: 1000px !important;
}
}

// Function to create the iframe URL
function createIframeURL() {
// Get the parent URL and create a URLSearchParams object
var parentURL = new URL(window.location.href);
var params = new URLSearchParams(parentURL.search);

// Construct the iframe URL with all parameters
var iframeURL = "https://freightwaves.dragonforms.com/loading.do?omedasite=0240MediaWhitePaperPCFInsurance20240827";

// Loop through all parameters and append them to the iframe URL
for (const param of params.entries()) {
var key = param[0];
var value = param[1];
iframeURL += `&${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
}

// Set the iframe URL
var iframe = document.getElementById("myIframe");
iframe.src = iframeURL;
}

// Call the function on page load
createIframeURL();

window.addEventListener("message", function(event) {
console.log('Event',event.data);
// Check if the origin of the event matches the expected iframe domain
if (event.origin === "https://freightwaves.dragonforms.com") {
// Handle the message received from the iframe here

if (event.data.message === "redirect") {
console.log("Redirecting...");

// Construct the redirect URL with the email parameter
const redirectUrl = "https://bit.ly/3MlX6TP";

// Perform the redirection
window.location.href = redirectUrl;
} else {
console.log("Message received, but not a redirect.");
}
} else {
console.log("Received message from unexpected origin:", event.origin);
}
}, false);

The post White Paper: Top 10 Must-Knows For FMCSA Compliance appeared first on FreightWaves.

Source: freightwaves - White Paper: Top 10 Must-Knows For FMCSA Compliance
Editor: Sponsor

menu