Announcement

Collapse
No announcement yet.

Tutorial: making fragments, products and sections go where you want them.

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

    #16
    yes, it looks like actinic has mangled the javascript.

    the rest of it is perfect!

    try moving the function out of the page by creating a function in your actinic extras again. thus:

    HTML Code:
    function makeitso() {
     //make an array of all the divs on this page.
     MoveUs = document.getElementsByTagName("div"); 
     
     //loop all the divs.
     for( var i = 0; i < MoveUs.length; i++ ) 
     { 
     
     //only if it has the class 'movethis'
     if (MoveUs[i].className=="movethis") {
     ThisItem = MoveUs[i]
     
    	//get the html from inside this div
    	temp = ThisItem.innerHTML;
    	
    	//where is it going?
    	document.write (ThisItem.title);
    	
    	//empty the old div
    	ThisItem.innerHTML = "";
    
    	//append it to the end of the target div, found in the rel attribute
    	document.getElementById(ThisItem.title).innerHTML = document.getElementById(ThisItem.title).innerHTML+temp;
    	}
     } 
    
    }
    than instead of having your code at the footer of every page, replace it with this:

    HTML Code:
    <script>makeitso();</script>

    Comment


      #17
      Originally posted by gabrielcrowe

      <script>makeitso();</script>
      LOL Gabe....you're bonkers!

      (and thanks!)
      Tracey

      Comment


        #18
        yay...I'm not a dumbass after all!

        all working hunky dory!

        just need to make a point of not using a layout with horizontal dividers though because it's stacking my empty dividers while the contents are off elsewhere.. IYSWIM

        Thanks Gabe!!

        EDIT

        ermm..I seem to have "topbitsbottombits" displayed at the bottom of the page where I have the
        Code:
        <script>makeitso();</script>
        pasted above the </body> tag

        note, I have experimented with one div id "topbits" and one div id "bottombits" to play with positioning...both work fine except for this text at the bottom of the page

        No doubt some airheaded thing I have done (or not done)
        Tracey

        Comment


          #19
          We are getting there!!

          Excitable "Text!!" worked fine and moved absolutely anywhere!

          Tried the description on the old fragment (the actual one needing moving)
          Its text has also moved but is a bit odd, mixing html as soon as it hits the [LINK] in the description. Also has not moved image or title? Weird?!

          http://trials.actinic.com/trials/tri...Treatment.html
          Sam
          http://www.originaltouch.co.uk
          http://www.spcb.co.uk

          If you spend your whole life waiting for the storm, you’ll never enjoy the sunshine.

          Failure is the tuition you pay for success.

          Comment


            #20
            Originally posted by OriginalTouch
            We are getting there!!

            Excitable "Text!!" worked fine and moved absolutely anywhere!

            Tried the description on the old fragment (the actual one needing moving)
            Its text has also moved but is a bit odd, mixing html as soon as it hits the [LINK] in the description. Also has not moved image or title? Weird?!

            http://trials.actinic.com/trials/tri...Treatment.html
            yes, I'm getting that too because Actinic is opening with html markers again for the link

            if you change the [LINK] so it says
            Code:
             >!![LINK]!!<
            then it works.

            is there a way round that, Gabe?
            Tracey

            Comment


              #21
              Thanks budgetbumps - that worked for the html - any workaround is good if you find it.

              However, still only moves text of the fragment and NOT the title or image??!!
              Why is this?! Anyway of getting around that one, once you figure out why it's being done - one for GABE?
              Sam
              http://www.originaltouch.co.uk
              http://www.spcb.co.uk

              If you spend your whole life waiting for the storm, you’ll never enjoy the sunshine.

              Failure is the tuition you pay for success.

              Comment


                #22
                which fragment layout are you using?
                I suspect it's because whichever layout you're using doesn't have the image and title wrapped in the <div> to move it
                Tracey

                Comment


                  #23
                  Announcement for all users!! Move fragments where you want to!!

                  GOT IT!!

                  budgetbumps gave me the clue.
                  The divs were in the description of the fragment as per Gabe's 'simple' test instructions.

                  They needing moving to the fragment layout.

                  I can now use this layout on any page!

                  I think this workaround needs publicising as it is the only one to have worked and there are a lot of threads based on the same problem.

                  I feel quite happy now - not bad for a beginner I suppose!

                  HAVE A LOOK at the results! - Thanks everyone!
                  http://trials.actinic.com/trials/tri...Treatment.html
                  Sam
                  http://www.originaltouch.co.uk
                  http://www.spcb.co.uk

                  If you spend your whole life waiting for the storm, you’ll never enjoy the sunshine.

                  Failure is the tuition you pay for success.

                  Comment


                    #24
                    GABE:

                    Can you change your first post so that users can actually read the rest of the thread - it may put people off as it says that it is useless!!

                    Maybe tell people to read the last few posts?
                    Sam
                    http://www.originaltouch.co.uk
                    http://www.spcb.co.uk

                    If you spend your whole life waiting for the storm, you’ll never enjoy the sunshine.

                    Failure is the tuition you pay for success.

                    Comment


                      #25
                      done. thanks for the help testing chaps.

                      Comment


                        #26
                        a side note:

                        there are two distinct ways to create your moving content.

                        all you need to do is create a div with something inside it, if you do it with a new template, and insert your content with the interfece, or even use a normal fragment with some !!<html>!! blocks in it, it'll achieve the same result.. noving blocks of code.

                        but it should be noted that if you use the second type of code, you may be leaving something behind when you move your blocks. most likely some tables or some markup outside your movethis div container.

                        so, in short, creating a new template and using that template for your movable fragments is the best way.

                        Comment

                        Working...
                        X