Recent Topics

Bug WidgetsBeginSettingsForm()

Started by on May 28, 2017 – Contents updated: Jun 01, 2017

May 28, 2017 03:09    

When javascript is being used it breaks:
This occurs when the widgetSettings Modal form is called.


function WidgetBeginSettingsForm( & $params )
	{
	
			$params['Form']->custom_content( '<script> //some script file even if the script file is empty </script>' );
			

		return true;
	}

Request ERROR #1:
url: http://localhost/admin.php
POST data: ctrl=widgets&action=edit&wi_ID=309&nocache_dummy=1495931961898&display_mode=js
error: SyntaxError: Unexpected token <

May 29, 2017 09:44

escaping the script tag solves the problem:

$params['Form']->custom_content( '<\script\ src="'.$plug_url.'script.js" ></\script\>' );

May 29, 2017 14:50

I see it has been fixed. Thanks!


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.