Recuperer du javascript pour une iframe HTML
Salut,
je cree un composant la iframe dans une fonction javascript
comme ca:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<script type="text/javascript">
var wdth2 = 700;
var height = 700;
function adresse() {
return ifr = "http://www.php.fr";
}
function create_formulaire() {
var ifr = document.createElement('iframe');
ifr.src= "http://php.fr";
ifr.id= 'test';
document.body.scroll = 'no';
document.body.appendChild(ifr);
ifr.scrolling = 'yes';
ifr.style.width = wdth2;
ifr.style.height = height;
}
</script> |
j aimerai ensuite recuperer certaines de ces variable dans une iframe html
je fais donc ceci
Code:
1 2
|
<iframe src='<SCRIPT LANGUAGE="JavaScript">javascript:adresse();</SCRIPT>' width='<SCRIPT LANGUAGE="JavaScript">javascript:wdth2();</SCRIPT>' height='<SCRIPT LANGUAGE="JavaScript">javascript:height();</SCRIPT>'scrolling='yes'></iframe> |
Et ca marche pas...... snif help