Forum Moderators: open
i can insert my code in the adbrite-code.js?
this code:
<iframe src="http://www.example.com" width="300px" height="300px">
</iframe>
[edited by: DrDoc at 7:17 am (utc) on July 28, 2007]
if (!IFrameObj && document.createElement) {
// create the IFrame and assign a reference to the
// object to our global variable IFrameObj.
// this will only happen the first time
// callToServer() is called
try {
var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','RSIFrame');
tempIFrame.style.border='0px';
tempIFrame.style.width='0px';
tempIFrame.style.height='0px';
IFrameObj = document.body.appendChild(tempIFrame);
if (document.frames) {
// this is for IE5 Mac, because it will only
// allow access to the document object
// of the IFrame if we access it through
// the document.frames array
IFrameObj = document.frames['RSIFrame'];
}
} catch(exception) {
// This is for IE5 PC, which does not allow dynamic creation
// and manipulation of an iframe object. Instead, we'll fake
// it up by creating our own objects.
iframeHTML='\<iframe id="RSIFrame" style="';
iframeHTML+='border:0px;';
iframeHTML+='width:0px;';
iframeHTML+='height:0px;';
iframeHTML+='"><\/iframe>';
document.body.innerHTML+=iframeHTML;
IFrameObj = new Object();
IFrameObj.document = new Object();
IFrameObj.document.location = new Object();
IFrameObj.document.location.iframe = document.getElementById('RSIFrame');
IFrameObj.document.location.replace = function(location) {
this.iframe.src = location;
}
}
}
4 exam i want use this sample:
<script src="http://www.example.com/fram.js" type="text/javascript"></script>
but it doesnt work
plz help me....
[edited by: DrDoc at 7:17 am (utc) on July 28, 2007]
[edit reason] Examplified URL [/edit]
and called it with this script:
<script language="javascript" src="http://www.example.com/fram.js"></script>
how?
(my java dont work - plz help me and solv my js file)
[edited by: DrDoc at 7:15 am (utc) on July 28, 2007]
[edit reason] Examplified URLs [/edit]
how i can insert iframe code in to the js files and called it?
Just echo it out. In the fram_code.js file, something like:-
document.write('<iframe frameborder="0" scrolling="no" height="300" width="300" name="myFrame" src="http://www.google.com"></iframe>');
Then in the HTML page:-
<script language="javascript" src="http://www.example.com/fram-code.js"></script>
If you can explain why you're unable to do that, it might help us understand exactly what you're trying to achieve.