Loading html content in a div element with JQuery

asked 2016-05-19 11:13:00 +0800

Antoc gravatar image Antoc
21 4

In a ZK application I want to load within a zul div element in a zul file the content of an external html page. I believe the best approach is to use JQuery supported in ZK. I have added the following code that does display the alert message, but somehow the div element doesn't load the content of the page. Does anyone know where the problem may be?

<script type="text/javascript">
     jq(document).ready(function() {

<div id="graphWidget" style="height: 415px; width: 100%;">
delete flag offensive retag edit


why not use iframe?

chillworld ( 2016-05-19 12:41:33 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-27 04:01:20 +0800

hawk gravatar image hawk
2310 1 5
http://hawkphoenix.blogsp... ZK Team

Becuase the target site might not be accessible by your site for Access-Control-Allow-Origin. Please refer to http://stackoverflow.com/questions/10636611/how-does-access-control-allow-origin-header-work

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2016-05-19 11:13:00 +0800

Seen: 28 times

Last updated: May 27 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More