Refresh DIV area contents

I have DIV area on my page which contains php code <? echo
rand();?> this shows random number in DIV area, now i have to
refresh this DIV area so that on click only this DIV area refreshes
and new random number appears. after this i will update this DIV
section using timeout which will automatically refresh DIV area
after specific interval of time.
I am ok with loading another file in div area, but how can i
get the same functionality with some code or content in the div
area . Please help me in this regard. Thanks

1, make a single page that echos the echo rand.
2, use a function that pulls th php file in to the div
container, u using Spry.Utils.updateContent
1, u can probly do that your self,
2, i can give u a little example.
Include the following in the mainpage's header:
SpryData.js
SpryDOMUtils.js
Also include this script in your header:
<script type="text/javascript">
Spry.Utils.addLoadListener(function(){
updateDIV
function updateDIV(){
//DIVIDNAME = the id of the element where u want the rand to
be loaded in also u can change rand.php to what ever file name u
want to be loaded
//change settimeout to how many sec u want the div to be
refreshed
Spry.Utils.updateContent('DIVIDNAME', 'rand.php');
setTimeout('updateDIV();',10000);
</script>
This will do what u described in your post.

Similar Messages

  • Having problems when aligning footer div and content div close together, in the browsers they are wi

    My problem is when I paste text or paste anything in div tag. I have a container that contains everything. I have a content div that contains content. I also have a footer. When I align the footer at the end to content div which is in the container, it looks good until I look at it in a the different browsers, the content and footer are so wide apart. I've tried everything I could to make the browsers look as close as what I do in dreamweaver cs4. Is there a solution to this problem?
    This is the link to page working on.
    http://www.nlclv.org/truenewwebsite/html/doctrine.htm
    The footer and content div are align very close in dreamweaver but very far apart in the browsers.
    Also if you click on this link and click on calendar of events page you will see the samething.
    Thanks for your help.

    Absolutely positioned divisions are NOT a good primary layout method. Here's why:
    http://www.apptools.com/examples/pagelayout101.php
    You should use a CSS with default CSS positioning (which is no positioning at all).  And then use margins, padding and floats to align elements on the page.  Also, if you want the page height to flex to content (as it should), remove the height property from divisions containing text.
    Something like this:
    http://alt-web.com/TEMPLATES/2-col-fixed-flash-holder.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Refreshing only portal content area and not the naviagtion area.

    Hello all,
              I want to refresh only portal content area without refreshing the navigation contents.
       Eg;- When i click on the any document present in the REPORTS folder in Detailed Navigation Area only the portal contents should get refreshed.

    Links on DTN?Are they on a custom Iview?? Then u control with url mode.
    If they are page links, i don think u cud restrict one WD application not to refresh when the whole page getz refreshed.
    <b>Plz don forget points, if it helped.</b>
    Regards,
    P.

  • Any suggestions to avoid refreshing of TabPanel content of TabStrip control?

    Hello,
    I am using sap.ui.commons.TabStrip to toggle different views. The content displayed in TabPanel is included into iframe to avoid naming collision might happened in distributed environment. Due to the internal mechanism of TabStrip control, if the content of iframe is not saved and user toggle to another view, when he comes back, the iframe will be refreshed and unsaved content will be lost.
    Take the example below, iframe has been used in Tab1 to avoid naming collision, once user switch to Tab2, the TabStrip control will move content "<iframe src='test.html'></iframe>" in DIV of Tab1 into the hidden div with ID "sap-ui-preserve" and remove the DIV of Tab1. Once user switches back to Tab1, the DIV of Tab1 is reconstructed with content in div "sap-ui-preserve", refreshing occurs and filled content by user disappears. To avoid this, we have to use DIV to replace iframe, which means SPA, but there might be naming collision when there are 5-6 tabs and the tab content are developed by different developers.
    I checked other Tab controls, the Div of tab1 will be simply hidden with CSS, refreshing would not occur. Any other reasons to reconstruct the content of invisible Tabs? Or any suggestions if we continue to use UI5 control "TabStrip"?
    var oTabStrip = new sap.ui.commons.TabStrip({width:"500px",height:"380px"});
    var oTab1 = new sap.ui.commons.Tab();
    oTab1.setTitle(new sap.ui.core.Title({ text: "iframeTab" }));
    var oHtml = new sap.ui.core.HTML({ content: "<iframe src='test.html'></iframe>" });
    oTab1.addContent(oHtml);
    oTabStrip.addTab(oTab1);
    var oTab2 = new sap.ui.commons.Tab();
    oTab2.setTitle(new sap.ui.core.Title({ text: "inputTab" }));
    oHtml = new sap.ui.core.HTML({ content: "<input type='text'></input>" });
    oTab2.addContent(oHtml);
    oTabStrip.addTab(oTab2);
    oTabStrip.placeAt("content");
    Thanks a lot for any suggestions or comments!
    Patrick

    Hello Sakthivel,
    Thanks for the reply! The background is we are using UI5 to implement one SRM application, and which is developed by 20 developers. For individual page, one part is developed by application developers and shell by framework developers, application UI is embedded in the shell.there is requirement to access the control and set the attributes in different js files.
    For the shell, it's developed with declarative view, there isn't way to choose the control without ID. For application UI, without ID, variable of control have to be global variable to allow others' code to access.
    Regards,
    Patrick

  • AP divs are not showing in AP Elements window

    The AP divs are in the dreamweaver doc and show up under css etc. but when I click into AP Elements to modify the behaviors none of the AP divs show.

    There is a lot I don't know about Dreamweaver and am willing to learn another way to create hide and show or drag and drop.
    Use jQuery to hide/show divs. 
    http://jsfiddle.net/MdSTW/12/
    DW is not a drag & drop app like Muse or Photoshop.  With DW, you  need a good grasp of HTML & CSS code. JavaScript is also very helpful to know.  
    APdivs are rarely if ever required. 98% of all layouts are  created with default CSS positioning (none or static).  When you introduce APDivs, you remove content from the normal document flow which, if used incorrectly, can have dire consequences and even wreck the usability of your site. 
    My advice is stay away from APDivs.  Learn to align elements with CSS floats, margins, and padding.
    http://alt-web.com/DEMOS/3-CSS-boxes.shtml
    http://alt-web.com/DEMOS/CSS2-Captions-on-floated-images.shtml
    Nancy O.

  • PDF printing -- area contents overflows area content in line

    I have configured standard printing using fop.war in APEX 3.1. On occasion it produces a broken pdf file that cannot be opened with Adobe Reader 8. On the server, OC4J displays an INFO message: "area contents overflows area content in line". Sometimes a snippet of text follows the message. Is the INFO message related to producing a bad pdf? Are there limits on the size of pdf reports (width or length) that users need to know about?

    Is this a known bug in FOP?If I wanted to know the answer to that I would start looking here:
    http://xml.apache.org/fop/gethelp.html

  • FOP: "area contents overflows area in line" decrease?

    I get this strange FOP behaviour when generating PDF files with FOP: the more documents I generate, the less this
    area contents overflows area in line
    FOP message appears! I tested it by generating the exact same document over and over. These messages decrease until they don't appear anymore at all! When I restart my application (JVM) the same behaviour occurs: first lots of thses messages ... decreasing ... vanishing at all. Of course "real" messages stating the text that cause the overflow
    area contents overflows area in line Hello, this-is-a-very-long-text-that-doesnt-fit-into-the-FO-box
    still occur. Is this a known bug in FOP?

    Is this a known bug in FOP?If I wanted to know the answer to that I would start looking here:
    http://xml.apache.org/fop/gethelp.html

  • Bug #81169 - Div bkgrnd color (of 1st div w/ content) not honored if cfdocument/pdf written to disk

    Bug for: Div background color (of 1st div w/ content) is not honored when cfdocument/pdf is written directly to disk.
    ==================
    Steps to reproduce
    ==================
    Run the following code with (and without) the cfdocument 'name' attribute.  Then compare both PDFs (the PDF written directly to browser, and the PDF written directly to disk)
    <cfdocument format="pdf" name="myPDF">
    <div style="background-color:#1a9cee;"></div>
    <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st div w/ content. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black.</div>
    <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    </cfdocument>
    <cfif structKeyExists(variables, "myPDF")>
      <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    </cfif>
    ==================
    Attachments
    ==================
    PDF written directly to disk: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_01.pdf
    PDF written directly to browser: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_02.pdf
    Thanks!,
    -Aaron Neff
    Btw, this bug is new to CF9.  This bug did not affect CF 8.0.1.

    Ok, if anyone else is experiencing this same issue, here is a workaround.  The issue is that when a cfdocument-generated PDF is written directly to disk, then the background color of the 1st non-empty block-display HTML element is ignored (unless there is an inline-display HTML element preceding it).  Instead, the background color is near-black.
    So, the workaround is to simply ensure an inline-display HTML element preceds the problematic block-display HTML element.  (a <span></span> will do the trick)
    Here was the original code.  Note that line #3 is the 1st non-empty HTML element, and that it is a div (block-display), and it has a background color.  If the PDF is written to disk, then the specified background color is ignored.  Instead, the background color is near-black.  Again, this does not occur when the PDF is written directly to browser.
    1| <cfdocument format="pdf" name="myPDF">
    2| <div style="background-color:#1a9cee;"></div>
    3| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st non-empty block-display HTML element. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black (unless preceded by an inline-display HTML element).</div>
    4| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    5| </cfdocument>
    6| <cfif structKeyExists(variables, "myPDF")>
    7|   <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    8| </cfif>
    Here is the 'fixed' code (note that "display:inline" has been added to line #2):
    1| <cfdocument format="pdf" name="myPDF">
    2| <div style="background-color:#1a9cee; display:inline;"></div>
    3| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st non-empty block-display HTML element. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black (unless preceded by an inline-display HTML element).</div>
    4| <div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
    5| </cfdocument>
    6| <cfif structKeyExists(variables, "myPDF")>
    7|   <cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
    8| </cfif>
    magical

  • Divs are shifting after inserting spry menu bar

    I have tried so much that it has driven me crazy. Initailly I created this site by APdivs and it came out perfect and worked great, except it was not fluid and looked bad on bigger browser and screen size. I decided to change it to fluid way. Now I am in bad shape as soon as I put a horizontal spry menu bar. it shifts the columns to the left and leaves a blank space next to the column 3. I am out of idea, how to fix it. As soon as I take the menu bar out, it works perfect. and columns are stretched to the end on both sides.
    Here is the link of test page
    www.hpbsurgery.net
    This is what I have tried-nothing worked
    put menu bar in container
    put menu bar in header div
    Put mebu bar in a horizontal div inside header div.
    changed the size and dimension of menu bar
    Any help would be greatly appreciated as I am running out of time.
    Thanks much all....

    Thanks very much for your help. I just wanted to mention one thing which I discovered this am by accident out of frustration. Originally, I was trying to control the size of the 3 columns with external CSS and it was messing up after inserting menu bar. I wrote directly in the code this am to exactly define the size besides in my CSS. AND............it fixed the problem and stretched the columns to the end on both side and sizes were appropriate, I am still not sure why did it happen.
    I am not a professional and trying to build my own site as I have interest in web design, but this is first time with DW.
    I really appreciate your help and suggestion about the code.
    Thanks a lot, 
    Date: Wed, 26 Sep 2012 12:46:19 -0600
    From: [email protected]
    To: [email protected]
    Subject: Divs are shifting after inserting spry menu bar 
        Re: Divs are shifting after inserting spry menu bar 
        created by Nancy O. in Dreamweaver General - View the full discussion 
    You appear confused about how to use CSS classes and IDs.  Classes (.className) can be used multiple times in layouts as for re-usable styles.  IDs (#IDName) can be used only one time per page -- as for layout regions or when JavaScript is needed to act upon it.  Try copying and pasting this code into a new blank page.  Hopefully it will make more sense than what you have now. 
    <!NEW LAYOUT> 
    body  
    #header
    #horizontalmenu {
    min-height: 43px;
    width: 100%;
    overflow: hidden;
    margin: 0px;
    #leftbar {
    background-color: aqua;
    float:left;
    width: 18%; /*combined width and padding = 22%*/
    padding:2%;
    #middlebar {
    background-color: white;
    float:left;
    width: 52%; /*combined width and padding = 56%*/
    padding:2%;
    #rightbar    {
    background-color: green;
    color:white;
    float:right;
    width: 18%; /*combined width and padding = 22%*/
    padding:2%;
    #credential
    #footer {
    background-color: maroon;
    width: 100%;
    color:white;
    padding:2%;
    #header
    [Item 2 | #]
    [Item 3 | #]
    [Item 3.1 | #]
    [Item 3.1.1 | #]
    [Item 3.1.2 | #]
    [Item 3.2 | #]
    [Item 3.3 | #]
    [Item 4 | #]
    <!END #HEADER>
    #leftbar
    #middlebar
    #rightbar
    #credential
    #footer
      Nancy O. 
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4729585#4729585
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4729585#4729585
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4729585#4729585. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver General by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • DW CS3 displays div areas incorrectly

    I am laying out a page that was originally done using tables (gack!) and have a nice layout I am working on. I have created three <div> areas designed to emulate what one can do in a table and Dreamweaver CS3's Design display is really off.
    You can see the final page here:
    http://www.clarkelandscapes.com/new/service.html
    This is the way DW CS3 displays the image:
    Firefox and Safari display it this way:
    I cannot look at it in Internet Exploder because I design on a Mac.
    Is there a "fix" to get DW CS3 to display this correctly? Can anyone with Internet Exploiter take a look at the page and verify that it does work correctly?
    Thanks!

    This was hard-coded -- or at least as I was laying out my template, I was 100% in Code view. When building a template, I create the style sheet, then I make the HTML
    tags as empty spaces or with
    so I see something.
    I do not know how those extra closures happened, because I create the closes with "</ " where Dreamweaver just adds the rest.
    I did use a Project Seven plugin, but I can't imagine that would have caused this.
    "A discriminating irreverence is the creator and protector of human liberty."
    - Mark Twain

  • Refresh Buffer area

    Hi ,
      I am using cl_alv_table_create=>create_dynamic_table to get an dynamic internal table. At 5th record , the program is dumping and giving error as
    <b>'sub routine pool buffer is full'</b>.
    Could you please suggest me to refresh this buffer .
      Is there any Function module or method to refresh buffer area.
    Thanking you,
    Satya

    Hi Naga,
    There lies the problem. U can call this method only upto 21 times not more than that in one session. Even I too faced the same kind of situation. Then I arrived at a solution of storing the address of the new line type created  with the same structure of the table. Like,
    TYPES: BEGIN OF ty_stuff,
           tdref TYPE REF TO data,
           END OF ty_stuff.
    DATA w_stuff TYPE ty_stuff.
    DATA t_stuff TYPE TABLE OF ty_stuff.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
            EXPORTING
              it_fieldcatalog = it_fieldcat_fin[]
            IMPORTING
              ep_table        = new_table.
        IF sy-subrc EQ 0.
    Create a new Line with the same structure of the table.
            ASSIGN new_table->* TO <fs_table>.
            CREATE DATA w_stuff-tdref LIKE LINE OF <fs_table>.
            "(w_stuff-tabname).
            APPEND w_stuff TO t_stuff.
          ENDIF.
    So my table t_stuff will contain all the addresses of the table structures. Use that in this way:
          READ TABLE t_stuff INDEX l_seg_tabix INTO w_stuff.
          IF sy-subrc EQ 0.
            ASSIGN w_stuff-tdref->* TO <l_line1>.
          ENDIF.
    Now <l_line1> will be of line type of the internal table that u want to create.
    Anyways it depends on the requirements. I thought of sharing this, might be helpful in some way to u.
    -SatyaPriya

  • I need to move home and refresh icons back to the left. I uninstalled Firefox 4 and reinstalled Firefox 6 and the home and refresh icons are still on the left. Help! (I have tendonitis and this makes my wrist move too far.)

    # Question
    i need to move home and refresh icons back to the left. I uninstalled Firefox 4 and reinstalled Firefox 3.6 and the home and refresh icons are still on the right. Help!

    You can right-click on the "Home" button and choose "Customize," then drag all of the icons (including Home and Reload) to where you want them.
    For more detailed instructions, see [[How do I customize the toolbars?]]

  • Auto refresh/reload of content in km navigation iview?

    We are using loads of km navigation iviews to show content from km folders or taxonomy folders. Some of these are placed  on the portals front page (company news for example). Since many of our employees log into our portal in the morning and then keeps it in the background during the day without refreshing the page, they miss out on new items in these iviews. This could also apply to display screens in our factories.
    Does anyone have a solution as to how make these iviews refresh at certain intervals?
    Henning

    Hi Henning,
    have you fixed this issue?
    Could you please share with me the details?
    Thank you.
    Gio

  • CSS Div tag content???

    I am a novice working on a website... all the help is needed...
    I have a div layout for my website but want to create content with pictures, text, links inside the div tags... I know that there is many options to do it.
    What is the best way?
    Tables?
    Incorporating HTML?
    I guess if I can get past this obstacles I am well on my way.
    Thank you.
    GC02

    Tables are not required for modern web page layouts.
    Basic 1-column CSS Layout (view source in browser to see the CSS and HTML code)
    http://alt-web.com/TEMPLATES/Basic-1-col-fixed.shtml
    Basic 2-column CSS Layout
    http://alt-web.com/TEMPLATES/CSS-Basic-2-column-layout.shtml
    Tutorial: Creating your first web site in DW CS5 -
    http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Links in Faded div are invisible but still clickable

    I am using Dreamweaver CS3 with the Spry 1.6.1 updater
    installed. I have an AP Div that is initially hidden. Using
    Dreamweaver's Behaviors Panel to add Effects, I have successfully
    made that div fade in when a button is clicked. I then fade it away
    when I click a close button.
    My problem is that there are links in the div I faded away.
    Even though the div is now faded and invisible I can still click
    those invisible links! I would think that if the div has been faded
    and is invisible I should not be able to interact with it's
    contents. This happens in Safari Firefox and IE.
    While I am comfy with coding, Ideally I'd like an solution
    with little or no coding since I will be having others do this and
    they may not be comfortable with coding.
    Thanks in advance for any help,
    Dan

    While I thank you for the suggestion V1Fusion, the point of
    having Spry inside Dreamweaver is to not have to code. While I can
    personally code JavaScript, I teach Dreamweaver to people who don't
    know it, and frankly shouldn't have to since that is most of the
    point of using Dreamweaver! For instance the "Swap Image" behavior
    works right without anyone having to know how it works or the code
    works. This "Hide" effect should do the same. There should at least
    be an option in the dialog to add a display:none at the end. Such a
    little thing like this makes the effect pretty useless so it seems
    like a pretty important thing for Dreamweaver to have. Otherwise
    what's the point of having a half done feature that doesn't truly
    work?

Maybe you are looking for