Loading different banners into html file depending on screen width? (Responsive)

I have a html file that has my banner in it. I call my banner into the html file with this script in the head section: <script type="text/javascript" charset="utf-8" src="banner_edgePreload.js"></script>
I also have a second banner called banner2. So all I have to do to switch the banners in my html file is put a 2 after the word banner in the script above ^ because they use the same resources.
Now im trying to get it to change from banner to banner2 when screen width is 1200 or less.
I was using this code but it doesn't seem to be working:
<script type="text/javascript" charset="utf-8" src="banner_edgePreload.js"></script>
<script type="text/javascript" charset="utf-8" media="screen and (max-device-width: 1200px)" src="banner2_edgePreload.js"></script>
Any ideas on how I can get this to work?
Thanks!

Not sure if this is what you are looking for
Different Banners (and sizes) for different pages? - Squarespace Answers

Similar Messages

  • A working method to load local PDF and HTML files on iOS

    I had a lot of trouble getting this to work, and I'm hoping this post saves someone time. Some of the information that's been posted in other locations is either wrong, incomplete, or might only work on Android. By the time you read this message the information here may no longer be accurate, so here's the testing environment:
    Window 7
    Flash CS 5.5.0
    AIR 2.7.0.19530, which was compiled on June 28, 2011
    iPad 1, version 4.3.5 of iOS
    Let's get started.
    On iOS, you load external PDF and HTML files using the StageWebView class.
    On Windows, StageWebView works but the HTMLLoader class is a better choice if you're creating a desktop app.
    You can also load HTML files by reading in the file's text. The information in this post is only for loading external HTML files.
    StageWebView will not load a file that's in File.applicationDirectory. All files bundled in your app are placed in File.applicationDirectory, which means you'll have to copy any external file you wish to load with StageWebView to another directory.
    So where can you copy your file? File.applicationStorageDirectory won't work. File.documentsDirectory does work.
    Several people have recommended copying to a temporary file using File.createTempFile(). This works, but there's a catch: it seems that, like Windows, StageWebView relies on a file's extension when determining how to load it. When you create a temporary file on iOS using File.createTempFile(), the file will have no extension (and on Windows, File.createTempFile() creates a file with the extension .tmp, which is equally problematic).
    The solution to the file extension problem is to rename the temporary file by appending the original file's extension. AIR currently does not have a <file>.rename() function, so you'll have to do it using <tempFile>.moveTo().
    Here's some code I've successfully tested several times on both iOS and Windows. The file is copied to the temp directory. The file's extension is restored by just slapping the original file name to the end of the temp file.
            private function loadExternalFile():void
                var webView = new StageWebView();
                webView.stage = this.stage;
                webView.viewPort = new Rectangle( 0, 0, 1024, 555 );
                // Works with either html or pdf files.
                // These are stored in the root of the application directory.
                var fileName:String = "euei.pdf";
                //var fileName:String = "euei.htm";
                var sourceFile = File.applicationDirectory.resolvePath( fileName );
                var workingFile = File.createTempFile();
                try
                    sourceFile.copyTo( workingFile, true );
                    // You have to rename the temp file
                    var renamedTempFile:File = workingFile.resolvePath(workingFile.nativePath + fileName);
                    workingFile.moveTo(renamedTempFile, true);
                    webView.loadURL( renamedTempFile.url );
                catch (err:Error) { }

    I tried this with Flash CS5.5 and AIR 4.0 SDK. Any pdf loaded simply fills the viewPort with black. Also tested with a png version of the pdf and that displayed just fine.
    What's the purpose of copying to a temp work file? I found that webView.loadURL( sourceFile.url ); gave me the exact same results.
    Any ideas?
    Thanks!

  • Transforming xml file with different elements into HTML

    hi all !
    i have an xml object that has been generated from database using java. the xml file has numerous elements that have been merged into single file. all elements have been got from different table :-
    <?xml version = '1.0' ?>
    <ROWSET>
    <ROW id= "1">
    <EMPID>1</EMPID>
    <EMPADDRESS>H 3 STREET 4</EMPADDRESS>
    <EMPPHONE>98764653</EMPPHONE>
    </ROW>
    <ROW id="2">
    <EMPID>5</EMPID>
    <EMPQUAL>GRADE 12</EMPQUAL>
    <EMPGRADE>A</EMPGRADE>
    </ROW>
    </ROWSET>
    (its just a sample data, might not be wel formed)
    as it shows that each element "ROW" has data corresponding to different employee and with different details. actually these elemnt are the updates in an employee profile that have to be communicated to a distant located database. what i need is a tranformation into HTML so that the recieving user can view this file as html with relative headings of corresponding tables.
    (the schema at both ends is exact replica)
    any help in this regards would be obliging.

    thank you bro!
    the xml file has been created by importing multiple files resulted from XSU into a master file in java. we are running a web based project in a distributed environment. so i would need to make this page appear in a web browser with ACCEPT and REJECT command buttons as the receiver is the approving agent. what all i have thought of so far is to create a style sheet with templates of all heading of each table from where the data is coming from and then run a check on what table the data is from and place that specific heading on the entry. the style sheet would be placed at both ends so only the xml file will be transported and transformation would be done auto.
    i hope it works. but am not sure wether its the right approach or not.

  • Load XML content into HTML enabled TextField

    I'm trying to figure out how to use html such as <br />
    loaded from an XML element into a TextField.. if I use something
    like
    <desc>my description<br />line 2</desc> I
    get 3 nodes instead of one when loading the XML file. If I use
    something like <desc>my description&lt;br /&gt;line
    2</desc> then I get <br /> in the actual text.
    Can anyone clue me in as to how to store HTML in an XML
    element so I can load the content into a Dynamic TextField with
    HTML enabled?
    Thanks much!

    use the latter in your xml and use the htmlText property of
    your html-enabled textfield to display your text.

  • How to load decimal values into a file using bcp in SQL Server 2000?

    Hi everyone,
    I'm trying to load data from a database table to a text file using bcp on SQL Server 2000. When I'm loading the decimal values, the values before the decimal are not being loaded into the file. How could I load the values before decimals?
    Here are the DDLs and DMLs of what I'm trying to run:
    CREATE TABLE [dbo].[Product_Sales](
    [Year_of_Sale] [smallint] NOT NULL,
    [Product_Type] [varchar](25) NOT NULL,
    [Product_Group] [varchar](25) NOT NULL,
    [Category_Type] [varchar](25) NOT NULL,
    [Category_Group] [varchar](10) NOT NULL,
    [Product_Count] [bigint] NOT NULL,
    [Product_Amount] [decimal](19, 2) NOT NULL,
    [Category_Count] [bigint] NOT NULL,
    [Category_Amount] [decimal](19, 2) NOT NULL,
    CONSTRAINT [PK_Product_Sales] PRIMARY KEY CLUSTERED
    [Year_of_Sale] ASC,
    [Product_Type] ASC,
    [Product_Group] ASC,
    [Category_Type] ASC,
    [Category_Group] ASC
    ) ON [PRIMARY]
    ) ON [PRIMARY]
    INSERT INTO [Yearly_Sales].[dbo].[Product_Sales]
    VALUES(2010, 'Online', 'Web', 'Cameras', 'Electronics', 547, 0.00, 0, 0.00)
    EXEC [master].[dbo].[xp_cmdshell] 'bcp "SELECT * FROM [Yearly_Sales].[dbo].[Product_Sales]" queryout D:\Yearly_Sales\Product_Sales.dat -c -T -S'
    And the output I see in the file is:
    2010 Online Web Cameras Electronics 547 .00 0 .00
    The values before decimals are being truncated.
    Thanks,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

    You can modify the decimal column(s) in the table to varchar type before export. But it does not look good.
    alter table [dbo].[Product_Sales]
    Alter column [Product_Amount] varchar(20)
    alter table [dbo].[Product_Sales]
    Alter column [Category_Amount] varchar(20)
    Does that make any sense?
    Known is a DROP, Unknown is an OCEAN.
    Basically you modify the decimal column to a varchar type before you run the bcp command for export. You can modify your source table or you can modify them on the fly. It is just a workaround.
    Modifying the source wouldn't be a good idea. Never do that if you can't get your desired output.
    Known is a DROP, Unknown is an OCEAN.

  • How to export spool file into HTML file

    Hi,
    I have one Oracle procedure which meets our business requirement. I am keeping the output data into a log file and I am sharing that log file to the users.
    Sample Code:
    spool path\logile.log
    declare
    begin
    dbms_output.Put_line('output will come here');
    end;
    Now I want to spool the same output data into a HTML file and need to share with the users.
    Can any one please guide me, how to export our spool data into HTML format?
    Thanks in advance.

    Hello 909127,
    welcome to the forum.
    This is the forum for the tool Oracle Reports, not a general forum for reporting. Your question might be better posted in {forum:id=75} or {forum:id=144}.
    Nevertheless you need to give us more information, how your output looks like now and what you expect in HTML.
    Regards
    Marcus

  • Loading local images into HTML component

    I need to intermix text and images for a project I'm working
    on, and using htmlText seems the best way to do it. However, I
    can't get it to work when the images are loaded from the local file
    system.
    It seems to work fine with remote images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='
    http://knight.fb.hive7.com/res/img/ico/x32/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    But not with local images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='../assets/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    Anybody have any ideas or workarounds?

    Hi,
    I tried your solution, it did not worked, it gave me following error -
    ==========
    ReferenceError: Error #1056: Cannot create property placeLoadStringContentInApplicationSandbox on mx.core.FlexHTMLLoader.
        at com.exa.view::TestView/changeEvt()[/home/sachin/workspace/newed/src/com/exa/view/TestView .mxml:70]
        at com.exa.view::TestView/__toctree_change()[/home/sachin/workspace/newed/src/com/exa/view/T estView.mxml:89]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9308]
        at mx.controls.listClasses::ListBase/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:8989]
        at mx.controls::List/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\List.as:2279]
        at mx.controls::Tree/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\Tree.as:2952]
    ===========
    Here is the code, the function gets called on change event of a tree component(not shown in code here)
    ===============
    <mx:Panel width= "70%" height="100%" id="cpanel" paddingBottom="10" paddingLeft="20" paddingTop ="20">
            <mx:HTML id="htmlc" width="100%" height = "100%">
            </mx:HTML>
        </mx:Panel>
    <mx:Script>
        <![CDATA[
              public function changeEvt(event:Event):void{
                   htmlc.htmlLoader.placeLoadStringContentInApplicationSandbox = true;
                   htmlc.htmlLoader.loadString(rh.content.replace(/src="\/images/mg,'src="assets'));
        ]]>
    </mx:Script>
    ================
    It would be helpful if you give more insight on your html component.
    Adobe air -version - 1.5
    Thanks

  • Converting Smartforms output content into HTML File

    Hi,
    I have a requirement, Smartforms output contents needs be converted as HTML File and it should be sent as email.
    I am able to get the Smartforms output in html format but the output is shown as binary format.
    After the fm call the job_output_info parameter is holding the smartforms output content in
    job_output_info-XMLOUTPUT[]           (xsf content)
    job_output_info-XMLOUTPUT-STSHEET[]   (css content)
    job_output_info-XMLOUTPUT-TRFRESULT[] (html content)
    Help me out how to handle the job_output_info details to html format.
    Code
    DATA v_fm_name TYPE rs38l_fnam.
    DATA v_tdsfname TYPE tdsfname VALUE 'ZVR39_SF'.
    DATA output_options TYPE ssfcompop.
    DATA job_output_info TYPE ssfcrescl.
    DATA document_output_info TYPE ssfcrespd.
    DATA job_output_options TYPE ssfcresop.
    DATA w_control TYPE ssfctrlop.
    *-Finding the Smartform Layout Name
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = v_tdsfname
      IMPORTING
        fm_name            = v_fm_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    *-Defining the output to HTML Format
    *-Activating XSF Output
    output_options-xdfcmode   = 'X'.
    output_options-xdf        = space.
    output_options-xsfcmode   = 'X'.
    output_options-xsf        = 'X'.
    output_options-xsfoutmode = 'A'. "
    output_options-xsfoutdev  = 'P863'.
    output_options-xsfformat  = 'X'.
    *-Calling the Smartform Layout
    CALL FUNCTION v_fm_name
      EXPORTING
        output_options       = output_options
        user_settings        = 'X'
      IMPORTING
        document_output_info = document_output_info
        job_output_info      = job_output_info
        job_output_options   = job_output_options
      EXCEPTIONS
        formatting_error     = 1
        internal_error       = 2
        send_error           = 3
        user_canceled        = 4
        OTHERS               = 5.
    Giri

    Hi,
    Check this link.In that,I am converting the output of smartform to PDF and then attaching it through mail.
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/smartforms/smartform in abap.pdf

  • Automatically splitting documents into Html files

    Hi,
    I would like to generate several HTML files from a single FM document. Splitting should be done at the 'Heading 1' paragraph level, or the like.
    By reading the program's documentation, it seems FM9 can do this splitting automatically: in "Generating Ouput > Generating HTML > Preparing documents for conversion to HTML > Create links that simulate a TOC" you can read:
    "Adjust your document’s mappings so that a heading starts a new file. Do this by using the Start New, Linked Web Page option in the HTML Setup dialog box."
    Now, the File > Utilities > HTML Setup dialog box in the program does not appear to contain this option. I cannot find it anywhere else. I'm for sure looking for the wrong option, but would be grateful if someone can point me toward the right place where to look at.
    Paolo

    this video from Adobe TV makes Frame9/Robohelp/HTML look pretty easy:
    http://tv.adobe.com/watch/single-sourcing-and-multi-channel-publishing-in-technical-commun ication/single-sourcing-documentation-in-adobe-technical-communication-suite-25
    I know the original post said the HTML files were from a single Framemaker document (not multiple chapters in a book) but I thought this video would be an interesting watch for the Original Poster anyways.

  • Print the text into html file

    Dear all,
    How i will print the result directly to the html file instead of print output in the console.
    Give the sample code.
    Thanks & Regards,
    kumar

    Hi kumar :)
    I'm not sure if this is what you mean but Jakarta has an Element Construction
    Set (ECS) API that can generate elements for HTML and XML mark-up
    languages.
    Please checkout their site: http://jakarta.apache.org/ecs/

  • Insert script into html file

    Hello,
    I am using jdev 10.1.3. In my Project, I cannot add script to html file, because there is not any icon on the component paletta>html common.
    Also there is not any jsp page on the paletta too.
    Do you know anything about this issue? Am I change jdev release or is there anything that I can do on this release?

    this should work
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <%@ page language="java" contentType="text/html;charset=iso-8859-1"%>
    <html>
      <head>
        <title>TEST PAGE</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
        <meta http-equiv="Content-Script-Type" content="text/javascript"/>
        <meta http-equiv="Content-Style-Type" content="text/css"/>
        <script language="JavaScript" src="javascript/ClientFunktionen.js"></script>
      </head>
      <body>
        <h1>TEST</h1>
      </body>
    </html>If you don't use struts, remove the tablib entries.
    Timo

  • Can i embed HTML file into HTML file?

    Recently i learn to design and code my website from scratch with some help from my friend and asking here and there.
    I want to make it easier for editing so i make header and footer. At first i want to embed header.html and footer.html into index.html, as my friend said index.html is more google friendly than index.php
    I can't find the answer anywhere for embedding HTML into HTML, is there a way?
    My website is at http://www.baliweddingphoto.com
    Probably you guys can check and help me embed .html into .html
    Thanks before.

    Already did, i'm glad to hear from MurraySummers and Rob Hecker2 that no differences between index.html and index.php, so i will stick on using my index.php
    Now i can sleep well and continue my code learning without doubt
    Thanks Guys.

  • Load different thumbnails into different movieclips

    I'm creating a gallery and having a problem loading thumbnails into different MovieClips. I have all the MCs stored into an Array. I could load them if I wanted to type out:
    var thumbLoader1:Loader = new Loader();
    movieClipName1.addChild(thumbLoader1);
    but I would think there's a more dynamic way. Right now Im stuck at:
    var imageThumbNames:Array = new Array
    function photoLoaded(event:Event):void
        trace ("photo loaded");
        trace (xmlData.Person.length());
        imageThumbNames[photoNumberLoaded] = "image" + photoNumberLoaded;
        var image:Bitmap = event.target.content as Bitmap;
        image.smoothing = true;
        thumbHolderArray[photoNumberLoaded].addChild(image);
        if (photoNumberLoaded < xmlData.Person.length() && photoNumberLoaded < numberOfThumbs)
            photoNumberLoaded += 1;
            addThumbs();
    I tried switcing the var "image" with a name from the "imageThumbNames" array but that would've been too easy. Any help is greatly appreciated.

    var thumbLoader1:Loader = new Loader();
    movieClipName1.addChild(thumbLoader1);
    var imageThumbNames:Array = [your image files];  // populate in for-loop
    var photoNumberLoaded:uint=0;
    addThumbs();
    function photoLoaded(event:Event):void
        trace ("photo loaded");
        trace (xmlData.Person.length());
        //imageThumbNames[photoNumberLoaded] = "image" + photoNumberLoaded;
        var image:Bitmap = event.target.content as Bitmap;
        image.smoothing = true;
    //not sure if this is the right thing to add to add these loaders to
        thumbHolderArray[photoNumberLoaded].addChild(mc.getChildAt(0));
    photoNumberLoaded += 1;
        if (photoNumberLoaded < xmlData.Person.length() && photoNumberLoaded < numberOfThumbs)
            addThumbs();
    var mc:MovieClip=new MovieClip();
    function addThumbs(){
    mc["loader_"+photoNumberLoaded]=new Loader();
    var urlR:URLRequest=new URLRequest(imageThumbNames[photoNumberLoaded]);
    mc["loader_"+photoNumberLoaded].addEventListener(Event.COMPLETE,photoLoaded);
    mc["loader_"+photoNumberLoaded].load(urlR);

  • Loading Query results into a file/cache

    Hi,
    We have a Query which returns huge volume of data.
    spooling all the records will take a lot of time.
    Is there any other way through which we can load the results of this huge query into Oracle's Cache / File
    Tables used in the Query are Range hash composite partitioned tables.
    But, in the query only a single partition is being used.
    Suggest any method to acheive the same.
    Thanks,
    Kris.

    Alex Nuijten wrote:
    .... Blu, you're not suggesting that OP use the database what it's good for, are you?.... But then OP would loose database-independence...
    :)Ermm.... darn it, you're right, what was I thinking. ;)
    Anyway, should there really be a requirement to output the data to a file, then there's nothing wrong with using UTL_FILE...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_fh UTL_FILE.FILE_TYPE;
      3  begin
      4    v_fh := UTL_FILE.FOPEN('TEST_DIR','output.txt','w',32767);
      5    DBMS_OUTPUT.PUT_LINE(TO_CHAR(SYSDATE,'HH24:MI:SS'));
      6    FOR i IN (SELECT * FROM large_tbl)
      7    LOOP
      8      UTL_FILE.PUT_LINE(v_fh,
      9                        TO_CHAR(i.large_id,'fm999999')||','||
    10                        i.large_area||','||
    11                        TO_CHAR(i.large_line,'fm999999')||','||
    12                        TO_CHAR(i.datelogged,'DD/MM/YYYY')||','||
    13                        TO_CHAR(i.large_flag,'fm9')||','||
    14                        '"'||i.large_text||'"');
    15    END LOOP;
    16    DBMS_OUTPUT.PUT_LINE(TO_CHAR(SYSDATE,'HH24:MI:SS'));
    17    UTL_FILE.FCLOSE(v_fh);
    18* end;
    SQL> /
    09:01:08
    09:05:20
    PL/SQL procedure successfully completed.
    Elapsed: 00:04:12.47
    SQL> select count(*) from largetbl;
      COUNT(*)
       6637873Over 6.5 million records in 4 minutes 12 seconds, and that's with data formatting.

  • In I-Tunes, how can I consolidate multiple copies of the same album with different tracks into one file in my library screen?

    In Windows 7 , I tunes library/ albums, I have many albums ( all the same) with different tracks in each.
    Is it possible to consolidate the multiple cover photos into one ?

    Generally setting a common Album Artist will fix things, if not see Grouping tracks into albums.
    tt2

Maybe you are looking for

  • MuVo TX

    I recently purchased a 52 MuVo Tx SE but am having trouble gettting Windows (XP Home) to recognise it. When I first plugged it in, Windows recognised it and installed it as a USB Mass Storage device. After restarting my computer, it didn't appear as

  • Nokia 6288 - white screen with battery icon

    I've had problems with my Nokia 6288 since very soon after I bought it. I turn my phone on and it just has a white screen with the battery icon. I can punch numbers into the keypad to call out, but I cannot do anything else. Any idea how to reset the

  • ALV Insert Button Drop Down

    Hi all, Can any body please tell me that in ALV grid, how can i get the drop down for insert button in the tool bar with options "Add 1", "Add 2" ... inserting 1, 2 or 3 lines?? Thanks in advance, Kulwant

  • What to do about Adobe Photoshop CS6 13.0.1 Error Code: U44M2P6

    what to do about Adobe Photoshop CS6 13.0.1 Error Code: U44M2P6? tried repeated installs and reboots. Nothing works. Am using Windows 8.1.

  • What is it? Mystery circuit board??

    hello There, I have several 400MHz slot loaders and was playing at swapping optical drives in a couple of them when I noticed that one had an 'extra' piece on it's logic board. Both boards look identical apart from one had an additional raised small