I have created an iFrame in a gwt. I need to plot some SVG in that IFrame. Here is what I am doing
1. create an IFrame
2. make a call to jsp file which calls to several other js files.
3. the graphics gets plotted
Problem-
I am expecting all the graphic to be on the iFrame while, it is actually creating a new HTML page itself inside the iFrame. How can I stop this. As well, the new HTML page does not show me the scroll bar, how can i add that, because all my graphics is flowing out and not visible to me. Is there a way to do so. Please help me with some pointers.
I am not sure how to copy the code, so I have not done so.
Thanks!
<html>
<head>
<script type="text/javascript">
alert("Inside the jsp file");
var criticalPath = window.top.criticalPath;
</script>
</head>
<body>
<script type="text/javascript" src="./js/flow.js"></script>
</body>
</html>
Consider the above code where flow.js is plotting the pie chart. Now all this code is written in a jsp file. This jsp code is called from a gwt code from an iframe. Now i wanted this pie chart to be in iFrame but instead it is creating new HTML page inside the iFrame as
<iFrame>
<html>
..........
</html>
</iFrame>
I dont want this to happen. As well the new html that is created inside the iFrame does not have the scroll bar as my piechart is loosing its focus. Why is this happening? Any reason?
iFrame always contains an HTML document. This what iFrame tag was created for. Your jsp file renders as an HTML document inside of this iFrame.
To add scrollbars, add CSS to your jsp file. Set overflow: auto on an element that contains your svg image.