Announcement

Collapse
No announcement yet.

Load this local

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load this local

    How would I get this to load from a local location, I have tried adding file:// and file:/// at the start of the file location but it still wont load

    PHP Code:
            htmls = [[<!DOCTYPE HTML>
                <
    html>
                <
    head>
                <
    meta **********="cache-control" content="max-age=0" />
                <
    meta **********="cache-control" content="no-cache" />
                <
    meta **********="expires" content="0" />
                <
    meta **********="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
                <
    meta **********="pragma" content="no-cache" />
                <
    script type="text/javascript" language="JavaScript">
                function 
    catchIE() {
                    if (
    event.button == 2) {
                        return 
    false;
                    }
                }
                
                function 
    catchNS(e) {
                    if (
    document.layers || document.getElementById && !document.all) {
                        if (
    e.which == || e.which == 3) {
                            return 
    false;
                        }
                    }
                }
                
                if (
    document.layers) {
                    
    document.captureEvents(Event.MOUSEDOWN);
                    
    document.onmousedown catchNS;
                }
                else if (
    document.all && !document.getElementById) {
                    
    document.onmousedown catchIE;
                }
                
    document.oncontextmenu = new Function("return false");
                </
    script>
                <
    style type="text/css">
                
    body {
                    
    background-image:url("]]..thisPost.Sample.URL..[[");
                    
    background-repeatno-repeat;
                    
    background-size100100%;
                    
    width100%;
                    
    height100%;
                    
    margin0px;
                    
    padding0px;
                }
                
    html {
                    
    height100%
                }
                </
    style>
                </
    head>
                <
    body>
                 
                </
    body>
                <
    html>]];
                    
    Web.SetVisible("Web1"true);
                    
    Web.LoadHTML("Web1"htmls); 
    When thisPost.Sample.URL is a URL it will load fine, but when it has been changed to a local file it brakes, I looked at many CSS demo's but can't get any to work, any idea ?
    Last edited by kingzooly; 03-07-2016, 01:43 PM. Reason: Formating
    Plugins or Sources MokoX
    BunnyHop Here

  • #2
    Assuming that the image file resides at C:\folder\image.ext, this must be written as
    Code:
    background-image: url(file:///C|/folder/image.ext);
    Ulrich

    Comment


    • #3
      Originally posted by Ulrich View Post
      Assuming that the image file resides at C:\folder\image.ext, this must be written as
      Code:
      background-image: url(file:///C|/folder/image.ext);
      Ulrich
      Can I ask why we have to write C: as C| if you know, and I will use a string replace to change \ to / and C: to C|,
      I give that a play with thanks
      Plugins or Sources MokoX
      BunnyHop Here

      Comment


      • #4
        Computer still says no.

        Is this right? as this is still not loading anything



        Code:
        background-image:url("file:///C|/Users/******/Documents/Kingfisheranime/216477-Safe-gnarf1975.jpg");
        Plugins or Sources MokoX
        BunnyHop Here

        Comment


        • #5
          It seems the forum edited you post wrong or something got confused but

          background-image:url("file:///C|/Users/******/Documents/Kingfisheranime/216477-Safe-gnarf1975.jpg");
          is
          background-image:url("file:///C:/Users/******/Documents/Kingfisheranime/216477-Safe-gnarf1975.jpg");
          so its c: not c|
          Plugins or Sources MokoX
          BunnyHop Here

          Comment

          Working...
          X