How to get source/subsource from url and fire into BSD via javascript