www.webdeveloper.com
Results 1 to 5 of 5

Thread: Embed Live currency exchange on html website

  1. #1
    Join Date
    Sep 2012
    Posts
    22

    Embed Live currency exchange on html website

    Hi,

    Is there any way I could 'feed' a live currency exchange from a website and embed it on my html website?

    Im super noob so if possible, please explain step-by-step

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    South Africa
    Posts
    62
    Hi, Darren,

    If it's an HTML website (i.e. static pages), you're pretty much reduced to including a third party currency exchage website or parts thereof into one of your pages using an <iframe> ... </iframe> container. The drawbacks are of course that you have no control over the format or formatting of the site you include, and it may or may not fit into your layout.

    If it were me I'd be using PHP, at which point it would be trivial to suck an RSS feed with currency exchange rates into my own website, and format said data as necessary. But with static HTML one doesn't have that luxury.

    I hope I have understood your question and that the above helps.

    Cheers!

  3. #3
    Join Date
    Sep 2012
    Posts
    22
    Hi Frank,

    Yes I understand, received help regarding a a page which explains how to embed the currency tool of xe.com :
    http://www.xe.com/ucc/customize.php

    Im going to give this a try and see how far I get.

  4. #4
    Join Date
    Sep 2012
    Posts
    22
    My ultimate goal for this is to try have something similar to a marquee - slowly scrolling across the screen, in a certain area, what each countries currency rate is when compared to mine.

  5. #5
    Join Date
    Sep 2012
    Posts
    22
    I have decided to try do my own thing, below is the html code with the script I am trying to use.
    However it does not seem to be working, any help out here?

    Code:
    <div class="__content_block__ _rss_feeds_" id="templatemo_feed_wrapper">
    <div class="__content__" id="templatemo_feed">
    <div class="fl">
    <em><b>Please note: Exchange rates are updated monthly. </b>Last Update: 15 October 2012 01:27:42 PM</em>
    </div>
    <div class="cb"></div>
    <div class='indicator_list news_rss_feed rss_feed_news_item'><div id="indicator_scroller_4ffec21ed563a" class="indicator_scroller_container" style="width: -20px;">
    <div class="indicator_container"><div class="indicator_inner_container">
    <div class='indicator np fl'><div class='fl indicator_name'><img src="countries/australia.gif" height="15px" alt="aus" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.11178 AUD</div><div class='cb'></div></div>
    <div class='indicator  fl'>  <div class='fl indicator_name'><img src="countries/europe-flag.gif" height="15px" alt="eur" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.08823 EUR</div><div class='cb'></div></div>
    <div class='indicator  fl'>  <div class='fl indicator_name'><img src="countries/uk.gif" height="15px" alt="uk" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.07125 GBP</div><div class='cb'></div></div>
    <div class='indicator  fl'>  <div class='fl indicator_name'><img src="countries/hk.gif" height="15px" alt="hk" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.88713 HKD</div><div class='cb'></div></div>
    <div class='indicator  fl'>  <div class='fl indicator_name'><img src="countries/new zealand.gif" height="15px" alt="nz" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.14027 NZD</div><div class='cb'></div></div>
    <div class='indicator  fl'>  <div class='fl indicator_name'><img src="countries/usa.gif" height="15px" alt="usa" style="margin:0px"/></div><div class='fr indicator_value red'>1 ZAR = 0.11447 USD</div><div class='cb'></div></div>
    </div></div></div></div></div>
    
    <script language="javascript" type="text/javascript">
        var widtha = $("#indicator_scroller_4ffec21ed563a .indicator").width();
        $("#indicator_scroller_4ffec21ed563a .indicator").each(function () { widtha += $(this).width() + 23; });
        function scroll_4ffec21ed563a(direction) {
            if (direction == "right") {
                $("#indicator_scroller_4ffec21ed563a .indicator_container").animate({ marginLeft: "-" + widtha + "px" }, 250000, "linear"); 
                setTimeout(function () {
                    scroll_4ffec21ed563a("left");
                }, 250100);
            } if (direction == "left") {
                $("#indicator_scroller_4ffec21ed563a .indicator_container").animate({ marginLeft: "0" }, 250000, "linear");
                setTimeout(function () { scroll_4ffec21ed563a("right"); }, 250100);
            }
        } scroll_4ffec21ed563a("right")
    </script>
    </div>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles