Welcome, Guest
  • Author Topic: get url javascript:openPicture not working in frameset  (Read 2761 times)

    till

    • Seasoned Programmer
    • ***
    • Posts: 200
      • View Profile
      • Email
    hi.
    till again.

    my flash doesnt work in a frameset. with target_blank its working.

    working:    http://www.valkyria.tv/villa_slide/load_images.htm


    not working:   http://www.raum-objekt.ufg.ac.at

                                         klick---> zentralfach_studio review
                                         klick--->  zentralfach 2003/04
                                                        museumsprojekt
                                                        villa_sinnenreich_rohrbach






    Code: [Select]
    getURL("javascript:openPicture('jpg','../neuer/cont/allimages/"+_root.adresse+"/"+myData["url"+i]+"','"+myData["weite"+i]+"','"+myData["hoehe"+i]+"','"+myData["url"+i]+"','350','50')");

    any ideas?
    thanks for helping.
    till.

    vesa kortelainen

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 3450
      • View Profile
    may be im wrong but both sites open a image for new win..

    till

    • Seasoned Programmer
    • ***
    • Posts: 200
      • View Profile
      • Email
    hi vesa

    i dont get you.

    till.

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Hi Till,
    what are you trying to do?

    This is the code to generate a popup - so it does.

    If you want to update an existing frame, just use this:

    Code: [Select]

      getURL("urlToSite","targetFrameName");


    There is no need for JavaScript ;)

    BTW: if you dont want to modify the window, there is no need for JavaScript in popup either, if you use this:

    Code: [Select]

      getURL("yourePage","_blank");


    This opens a new page, configured like the standard page, with the new content.
    happy flashing
    8)
    Ronald

    till

    • Seasoned Programmer
    • ***
    • Posts: 200
      • View Profile
      • Email
    hi roland.

    the reason was because when clicking on the bigger (thumbnail)jpg a popup has to open with the origial jpg in the the right size.
    flash loads the thumbnails folder.
    php reading the mainfolder and sending all information (name of jpg, weite, höhe,)
    to flash.
    on clicking, i use the get url---javascript.
    the problem was, on my private space, when the same htm was called everythin worked.
    but when i load this same page into the frameset of our scool-site, the popufunction didnt work no more.
    i have to use my private space for all parts that are php-driven, because there is no php on the scool-site.
    in the end, i solved the problem. i put the page into a frameset on my site, and load this frameset into the scoolpage.
    this works.
    but i dont know why.

    till.

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Hi Till,
    did you check the variables?
    Are they realy representing the path to the files?

    Just think, that, if you are not at the same site, you have to use absulte paths, because there is no relation ;)
    happy flashing
    8)
    Ronald

    till

    • Seasoned Programmer
    • ***
    • Posts: 200
      • View Profile
      • Email
    hi roland
    its working but i dont know why.

    Code: [Select]
    <HTML>
    <HEAD>
    <meta http-equiv=Content-Type content="text/html;  charset=ISO-8859-1">
    <TITLE>load_images</TITLE>
    <style type="text/css">
    <!--
    A:link { color: #000000; text-decoration: none; }
    A:visited { color : #000000; text-decoration: none; }
    A:hover {color: #FF6600; text-decoration: none ;}
    A:active {color: #FF6600;  text-decoration: none; }
    //-->
    </style>




    <SCRIPT LANGUAGE=JavaScript>
    <!--
    var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
    // Handle all the the FSCommand messages in a Flash movie
    function fscommand_DoFSCommand(command, args) {
       var fscommandObj = InternetExplorer ? fscommand : document.fscommand;
        if(command == "openPicture") {
          openPicture();
       }
    }




    function openPicture(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
       newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
       newWindow.document.open();
       newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
       
       newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); //   }
       newWindow.document.write('</body></html>');
       newWindow.document.close();
       newWindow.focus();

    }


    // Hook for Internet Explorer
    //if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && //navigator.userAgent.indexOf("Windows 3.1") == -1) {
       //document.write('<SCRIPT LANGUAGE=VBScript\> \n');
       //document.write('on error resume next \n');
       //document.write('Sub fscommand_FSCommand(ByVal command, ByVal args)\n');
       //document.write('  call fscommand_DoFSCommand(command, args)\n');
       //document.write('end sub\n');
       //document.write('</SCRIPT\> \n');
    //}
    //-->
    </SCRIPT>


    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <center>
     <br>
     <br>
     <br><br>
     <br>
     <!-- URL's used in the movie-->
     <!-- text used in the movie-->
     <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    ID="load_images" WIDTH="600" HEIGHT="360" ALIGN="">
    <PARAM NAME=movie VALUE="load_images.swf?bgcolor=#ffffff"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#ffffff> <EMBED src="load_images.swf?bgcolor=#ffffff" quality=high bgcolor=#ffffff  WIDTH="600" HEIGHT="360" swLiveConnect=true ID="load_images" NAME="load_images" ALIGN=""
    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>
    </center>
    </BODY>
    </HTML>

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Great for you :D

    BTW, my name is Ronald ;)
    happy flashing
    8)
    Ronald

    till

    • Seasoned Programmer
    • ***
    • Posts: 200
      • View Profile
      • Email
    sorrry

    im at work and very busy.

    till.