Results 1 to 2 of 2

Thread: Non-coder wants easy way to scale up widget

  1. #1
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Non-coder wants easy way to scale up widget

    Hi - I have a javascript-related problem which might be quite simple to fix, but as I can't code anything above basic HTML I'm totally clueless.

    The situation is as follows: I just installed a widget on my blog which randomly displays one newspaper front page from around the world every time it loads. You can see it in the right-hand sidebar at my site: www.riverscrap.com (hit refresh to see a different paper). There are two problems, though.

    1. As you can see it's far from the optimum size. I really want the width to be 170 pixels every time, but editing the Javascript code below did not work. I'm guessing this is because the settings are all configured remotely at the source page? (PressDisplay.com). Is there a simple way of me 'zooming in' or 'scaling up' my widget? (Note btw that different newspapers are differently sized, so though the width should always be 170, the height must not be arbitrarily restricted).

    2. There's an annoying border which I am once again powerless to get rid of. If you look at this page - http://riverscrap.typepad.com/home/g...a3c23772c.html - you can see the border looks pretty nice on a white background, but not so much on grey. Is there a way of re-jigging the code so that it looks nicer on my grey background?

    If anyone has any idea how I can customise those two features (size & border) simply by pasting in extra code, please do suggest something! As things stand the widget probably wouldn't be worth keeping, but with a little tweaking I think it would look fantastic on my blog.

    Thanks in advance for any help

    Martin



    Code:
    <script type="text/javascript"><!--
    pdaff_id = "mDRo5OGz47do%2bbumP9U0Aw%3d%3d";
    pdaff_channel = "hh";
    pdaff_width = "130";
    pdaff_height = "230";
    pdaff_group = "Widgets";
    pdaff_type = "FrontPages";
    pdaff_name = "FrontPages";
    pdaff_countries = "";
    pdaff_cids =  
    "1048,1049,1190,1020,1029,1067,1074,1151,1055,1084,1156,1023,1245,1057,1288,1014,1025,1019,1047,1062,1021,1585,1720,62 
    03,1052,1038,1143,1392,1091,1066,6107,1007,1114,1126,1145,1138,1110,1104,1457,1125";
    //--></script>
    <script type="text/javascript" src="http://affiliate.pressdisplay.com/Services/PDAffContentLoader.ashx"></script>
    Last edited by mart-rs; 01-14-2009 at 12:44 AM.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    as for the border, I assume the border is set by a style sheet but you could try forcing it using inline style

    Code:
    <script type="text/javascript">
    /*<![CDATA[*/
    (function(){var u="undefined";var src="http://affiliate.pressdisplay.com/AffObjectContent.aspx?pdaff_id="+pdaff_id+(typeof(pdaff_channel)==u?"":"&channel="+pdaff_channel)+(typeof(pdaff_width)==u?"":"&width="+pdaff_width)+(typeof(pdaff_height)==u?"":"&height="+pdaff_height)+"&group="+pdaff_group+(typeof(pdaff_type)==u?"":"&type="+pdaff_type)+"&name="+pdaff_name+(typeof(pdaff_countries)==u?"":"&countries="+pdaff_countries)+(typeof(pdaff_cids)==u?"":"&cids="+pdaff_cids);document.write("<iframe name='pdaff_frame' width='"+pdaff_width+"' height='"+pdaff_height+"' frameborder='0' src='"+src+"'  style='border-Left:solid red 1px;border-Bottom:solid red 1px;border-Top:solid blue 1px;border-Right:solid blue 1px;' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no'></iframe>");})()
    /*]]>*/
    </script>
    Ive used red and blue

    as for the width and height your second link suggests this can be changed but you cant dynamically change the height as you need the height of find the iframe content and you can't as its from a different domain.

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    mart-rs (01-28-2009)

Bookmarks

Posting Permissions

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