PDA

View Full Version : console log from admin options not working


Dr.CustUmz
05-04-2016, 08:13 PM
im trying to test some things in a setting yet its not posting to the console, other stuff (scripts, styles,html) all load just fine in this location why cant i console log...

<setting varname="drc_core_spt" displayorder="999">
<datatype>free</datatype>
<optioncode><![CDATA[<script>console.log('SHIT LOGGED..');</script>

MarkFL
05-04-2016, 09:42 PM
My guess would be you need to echo that script. :)

Dave
05-04-2016, 09:57 PM
Pretty sure it doesn't work because the AdminCP of vBulletin makes use of iframes and it doesn't log the console.log calls in iframes.

http://stackoverflow.com/questions/14924362/capture-console-log-of-an-iframe

Dr.CustUmz
05-05-2016, 12:09 PM
even on the options page it doesnt work (out of iframe), but the script triggers (added an alert to test that)

example admincp/options.php?do=options&dogroup=onoff
goes directly to that page