Avatar billede pacifico Nybegynder
12. november 2000 - 13:10 Der er 1 løsning

DYNAPI - loading ext files /frames

Hejsa,

Problemet er at få loadet en extern fil ind i et vindue v.h.a DYNAPI\'et. Det funker fint i et dokument uden frames, men ikke når jeg har et frameset. Jeg tror at det er \"body Onload\" kaldet det er galt med, men kan ikke gennemskue hvad der er galt.

1. Har et frameset der ser således ud.

</head>


    <frameset cols=\"*,799,*\" frameborder=\"NO\" border=\"0\" framespacing=\"0\">
     
  <frame src=\"Html/frameset/leftframe.htm\" name=\"leftFrame\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"NO\" noresize frameborder=\"NO\">
     
  <frame noresize marginwidth=\"2\" marginheight=\"0\" name=\"mainFrame\" frameborder=\"NO\" src=\"Html/mainPage.htm\" scrolling=\"NO\">
     
  <frame src=\"Html/frameset/rightFrame.htm\" scrolling=\"NO\" noresize marginwidth=\"0\" marginheight=\"0\" name=\"rightFrame\" frameborder=\"NO\">
    </frameset>


<noframes><body bgcolor=\"#FFFFFF\">

2. Hoveddokumentet \"mainPage\" ser således ud.

<html>
<head>
<title>Frontagent</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<script language=\"JavaScript\" src=\"../dynapi/js/dynlayer.js\"></script>
<script language=\"JavaScript\" src=\"../dynapi/js/scrollwindow.js\"></script>

<script language=\"JavaScript\">
<!--

onload=init
function init() {
}

listWindow = new ScrollWindow(0,0,200,270,\'mainPage\')
listWindow.bgColor = \"none\"
listWindow.border = 3
listWindow.setMargins(10,10,10,10)
listWindow.build()

listWindow.onScroll = showFactors
listWindow.onLoad = finishLoad

function showFactors() {
    document.myform.xfactor.value = this.getXfactor()
    document.myform.yfactor.value = this.getYfactor()
}

function finishLoad() {
    document.myform.url.value = this.url
}

writeCSS(
listWindow.css
)

//-->
</script>
</head>

<body bgcolor=\"#ffffff\" topmargin=\"75\" marginheight=\"75\" >
<table width=\"707\" border=\"4\" cellspacing=\"0\" cellpadding=\"0\" background=\"../images/FAbackground.jpg\" height=\"531\" align=\"center\">
  <tr>
    <td height=\"221\" width=\"240\">&nbsp;</td>
    <td height=\"221\" width=\"455\">&nbsp;</td>
  </tr>
  <tr>
    <td rowspan=\"2\">
      <div id=\"Layer1\" style=\"position:absolute; width:200px; height:270px; z-index:1; left: 68px; top: 243px\">
        <script language=\"JavaScript\">
        document.write(listWindow.div)
        tekst
</script>
      </div>   
    </td>
    <td width=\"455\">&nbsp;</td>
  </tr>
  <tr>
    <td width=\"455\">&nbsp;</td>
  </tr>
</table>
<a href=\"java script:listWindow.load(\'text-methods1.html\')\">load page 1</a> <br>
<a href=\"java script:listWindow.load(\'test.cfm\')\">load page 2</a>

<p>Scroll:
<br><a href=\"java script://\" onMouseDown=\"listWindow.up(); return false\" onMouseUp=\"listWindow.stop()\" onMouseOut=\"listWindow.stop()\">up</a>
<br><a href=\"java script://\" onMouseDown=\"listWindow.down(); return false\" onMouseUp=\"listWindow.stop()\" onMouseOut=\"listWindow.stop()\">down</a>

<form name=\"myform\">
Info:
<br>X Factor: <input name=\"xfactor\" type=\"text\" size=15>
<br>Y Factor: <input name=\"yfactor\" type=\"text\" size=15>
<br>URL: <input name=\"url\" type=\"text\" size=20>
</form>
</body>
</html>

3. En af siderne der kaldes ser sådan her ud.

<html>
<head>
<body onLoad=\"parent.mainPage.listWindow.activate()\">

table border=1 width=500>
<tr><td>

<p><b>Page 2</b>

<p>This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. </P>
<p>This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. This is my content. </P>
</td></tr></table>
</body>
</html>

...skal lige siges at jeg har ca. 1 uges erfaring i DHTML/Javascipt etc, så vær lidt blid - og koncis.
Avatar billede pacifico Nybegynder
18. november 2000 - 13:37 #1
...har selv løst problemet.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester



IT-JOB

Saab Danmark A/S

Senior Software Developer

Udviklings- og Forenklingsstyrelsen

Webanalytiker til digitale løsninger

Udviklings- og Forenklingsstyrelsen

IT-generalister til rollen som systemejer

Gehl Architects ApS

IT Supporter