0

set sclass in iframe

asked 2012-07-15 22:17:40 +0800

andij62 gravatar image andij62
301 1 6

Hallo all,

i have a iframe to show a pdf. After the pdf is loaded i will change the zoom-faktor with this css-code

<style>
	.iframe {
	zoom: 1.25;
	-moz-transform: scale(1.35);
	-moz-transform-origin: 0 0;
	-o-transform: scale(1.35);
	-o-transform-origin: 0 0;
	-webkit-transform: scale(1.35);
	-webkit-transform-origin: 0 0;
	}
</style>

How can i change the sclass from the iframe after the pdf is rendered?

Thx for the help
Andi

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-07-18 02:13:07 +0800

vincentjian gravatar image vincentjian
2245 6

updated 2012-07-18 02:13:26 +0800

Hi Andi,

I have create a sample in zkfiddle:

ZKFiddle-Link

test.zul
<zk>
<window border="normal" title="hello">

<div>Welcome to ZK Fiddle , run it right now!</div>

<button id="btn" label="Click Me" />
</window>
</zk>

index.zul
<zk>
<style>
.iframe {
zoom: 1.25;
-moz-transform: scale(1.35);
-moz-transform-origin: 0 0;
-o-transform: scale(1.35);
-o-transform-origin: 0 0;
-webkit-transform: scale(1.35);
-webkit-transform-origin: 0 0;
}
</style>
<script>
function changeStyle () {
var iframe = zk.Widget.$('$iframe');
jq(iframe.$n()).addClass('iframe');
}
</script>
<iframe id="iframe" src="test.zul" width="100%" height="300px" xmlns:ca="client/attribute" ca:onload="changeStyle()"/>
</zk>

You can also refer to document here.

link publish delete flag offensive edit

answered 2012-07-18 08:12:20 +0800

andij62 gravatar image andij62
301 1 6

Hi Vincent,

thank you! It works fine!

regards Andi

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2012-07-15 22:17:40 +0800

Seen: 127 times

Last updated: Jul 18 '12

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