Bug ID 465863: Error: Object doesn't support property or method 'trim'

Last Modified: Nov 07, 2022

Bug Tracker

Affected Product:  See more info
BIG-IP APM(all modules)

Known Affected Versions:
11.5.0, 11.5.1, 11.5.1 HF1, 11.5.1 HF10, 11.5.1 HF11, 11.5.1 HF2, 11.5.1 HF3, 11.5.1 HF4, 11.5.1 HF5, 11.5.1 HF6, 11.5.1 HF7, 11.5.1 HF8, 11.5.1 HF9, 11.5.10

Fixed In:
11.5.2

Opened: Jun 05, 2014
Severity: 3-Major
Related Article:
K16226

Symptoms

When using BIG-IP Edge Client to connect to Network Access, the system posts an 'Object doesn't support property or method 'trim'' error; however, the system still connects.

Impact

This is an error message only. There is no loss in functionality. The system posts a message similar to the following: An error has occurred in the script on this page. Line: 356 Char: 13 Error: Object doesn't support property or method 'trim' Code: 0 URL: https://VPN_URL/my.policy Do you want to continue running scripts on this page? There are Yes and No buttons in the popup window. No matter which button you click, the Network Access connection can be established.

Conditions

When adding a third option in the 'logon page agent' use Select as Type, and Then connect to the virtual server using the Edge Client.

Workaround

To work around the problem, add the following lines to the logon.inc customization file. if(typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; } ... snipped ... ?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <title>%{session.server.network.name}</title> <link rel="stylesheet" type="text/css" HREF="/public/include/css/apm.css"> <script language="JavaScript" src="/public/include/js/session_check.js" ></script> <script language="javascript"> <!-- <? include_customized_page("logout", "session_expired.js"); ?> if(typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; } var globalRestartOnSubmit = false; ... snipped ...

Fix Information

A JavaScript error screen no longer displays when using BIG-IP Edge Client to connect and the logon page contains an additional select type.

Behavior Change