jquery - Cross domain scripting error? -
I'm using the following code to draw stock value from Yahoo Finance
& Lt; Script type = "text / javascript" & gt; $ (Function () {$ ("# quote"). Load ("http://finance.yahoo.com/q?s=utg # yfs_l10_utg"). Text ();}); & Lt; / Script & gt;
I get the following error: -
Security Error: Content in file: [file URL] http: // can not load data from finance is. Yahoo.com/q?s=utg Error: [exception ... "Access denied to restricted URI" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location : "[File url]"]
source file: [url]
Does anyone have any idea how can I view it?
Javascript security model does not allow you to load off-domain content, a good explanation on this and Some work of jQuery is around .getJSON Docs:
Comments
Post a Comment