Announcement

Collapse
No announcement yet.

expanding html using javascript

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

    expanding html using javascript

    Hello all,

    First off I don't yet have my site uploaded, so I'm hoping someone can point me in the right direction without having to see the site itself. Sorry.

    I've been trying to get this piece of code working but to no avail. It's called highslide and uses JavaScript to pop up a piece of HTML in an iframe.

    For some reason it just won't work - I have added the .js file to the javascript functions selector, added the file to "additional files" and followed the instructions to the letter from the highslide readme file.

    All I am getting when I preview the page and click the link is the "loading" image. Hovering the mouse over the image brings up javascript:void(0) on the address bar.

    Here is the code I have used :

    <div id="prod_moreinfo"><a href="file:///C:/Documents and Settings/My Documents/Actinic v9/Sites/Site1/delivery-short.htm" onclick="return hs.htmlExpand(this, { objectType: 'iframe' } )">Delivery</a></div>
    Can anyone spot any obvious mistakes?!

    Many thanks in advance.

    #2
    Have you tried a simpler implementation as shown on their homepage first?

    Comment


      #3
      I'd add it into the head area as its own file just like you see actinic have done with a few files, then place the file in the site1 folder, that should be enough for it to get uploaded in my experience.

      You then need to embed the html into a fragment calling that js. Most importantly you need to have uploaded the site. If you are worried about it being seen by SEs then robots.txt it or use the actinic trial hosting. You are proving and solving nothing if you don't go on a live test domain, you may not even have a problem when you do.

      Comment


        #4
        Hi drounding,

        I have indeed, all to no avail. I'm a bit flummoxed to be honest!

        Comment


          #5
          Thanks for that lee.

          1 quick question, if I'm using a fragment, does that mean that I cannot add javascript calls to my product layout?

          Comment


            #6
            All depends what you are intending to use it on to be honest. A fragment can be added to a product/section page as much as it can be added to a brochure page, but if you are trying to get this to interact with the product image itself, then you will need to get your hands dirty on the product image layout i expect.

            Can you clarify what exactly you wish to use it on. I am pretty sure that Norman at drillpine.biz has an addon (usually £41.13) that does something very similar which will come with all the hard work done and installs itself. You might consider that instead as these things can often have much more to do than you think.

            Comment


              #7
              Javascript with Actinic can be a heady mix as Actinic undertakes some peculiar shenanigans we compiling the pages for publishing to the server. Check the forum for threads on Javascript .. particularly those from Norman and reference to [] .... squackets as Gabe calls them!


              Bikster
              SellerDeck Designs and Responsive Themes

              Comment


                #8
                Hi Lee,

                As it happens I'm already using Norman's lightbox plugin which is absolutly superb.

                For clarity, what I'm trying to do is to have a list of links under each product which when clicked pop up a small window with some explanatory text - I want it to look as pro as possible hence the highslide program which does the job perfectly (outside actinic!).

                I just don't know what I'm doing wrong here. I have searched for squackets, javascript and fragments etc but haven't found anything that seems to address the problem.

                Any help would be hugely appreciated!

                Comment


                  #9
                  pop across to show-hide-floating-div
                  on this page is a simple bit of css style required to do the actual hidding/showing and a bit of javascript to do the actual work.
                  in each case, you need to have a unique ID for each div containing the hidden contents
                  so
                  <div id='myDiv1'>div 1 contents</div>
                  <div id='myDiv2'>div 2 contents</div>

                  once you have this, then the code shows a bit of javascript that will do the showing/hiding whenever you hover on the link. (this can be changed to onClick if required)

                  If you need to have a single div that changes the contents, then you have to add a bit of code similar to:

                  document.getElementById('myHiddenDiv').innerHTM='my new contents<p>linetwo'

                  hope this helps.

                  kev

                  Comment


                    #10
                    I use Cool DHTML Tooltip for such things - see http://www.dynamicdrive.com/dynamici...tmltooltip.htm
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      MooTools will also do the same.


                      Bikster
                      SellerDeck Designs and Responsive Themes

                      Comment

                      Working...
                      X