1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Javascript/HTML expert

Discussion in 'Hire a Freelancer' started by jend_sudirman, Mar 22, 2010.

  1. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    Hi. I made a website for a client at
    Code:
    http://www.artsofrc.com
    using Joomla. The client want the website to have continuous music playing through out all pages, he want the music not stopping or restarting when a visitor change pages.

    I have tried to use an iframe to solve this problem, the only problem that still exist is that the height of the iframe is not fluid thus it left a lots of blank space when the content is shorter than the iframe.

    here's my iframe code

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <SCRIPT LANGUAGE="Javascript">
    function resizeIframeToFitContent (iframe) {
    iframe.height = document.frames (iframe.id)
    		.document.body.scrollingHeight;
    }
    </SCRIPT>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>RC STUDIO - if you are looking for unusual art objects</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #047E02;
    }
    -->
    </style>
    <script language="JavaScript" src="http://localhost/rcstudio2/images/stories/audio/audio-player.js"></script>
    <object type="application/x-shockwave-flash" data="http://localhost/rcstudio2/images/stories/audio/player.swf" id="audioplayer1" height="24" width="290">
    <param name="movie" value="http://localhost/rcstudio2/images/stories/audio/player.swf">
    <param name="FlashVars" value="playerID=audioplayer1&autostart=yes&leftbg=0x01ab02&rightbg=0x01ab02&track=0xe9bf16&righticon=0x333333&border=0x008001&loop=yes&rightbghover=0x008001&righticonhover=0x333333&bg=0x008001&soundFile=http://localhost/rcstudio2/images/stories/audio/Degung_-_Dikantun_Tugas.mp3">
    <param name="quality" value="high">
    <param name="menu" value="true">
    <param name="wmode" value="transparent">
    </object>
    </head>
    <body>
    <iframe src="http://localhost/rcstudio2" scrolling="no" marginwidth="0" marginheight="0" width="100%" height="1550px" frameborder="0"></iframe>
    </body>
    </html>
    I need someone who can edit/enhance my iframe-html code so that it will have fluid height.

    I will pay $5 for this job, or you can ask for a price and then we can discuss it.

    Thank you.
     
  2. moronic_kaos

    moronic_kaos Regular Member

    Joined:
    Nov 17, 2009
    Messages:
    273
    Likes Received:
    561
    Location:
    Connecticunt
    • Thanks Thanks x 1
  3. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    Thx for the reply, moronic kaos. I'm totally code blind on this.

    I have visited both link you sent me, so how do I do this? where do I put the
    Code:
    <FRAMESET COLS="*,0">
    <FRAME SRC="myPage.asp">
    <FRAME SRC="HiddenFramePage.asp" NAME="frmHiddenFrame">
    </FRAMESET>
    ??

    on head tag of my html page/container page?

    Ahhh..I'm so helpless..
     
  4. moronic_kaos

    moronic_kaos Regular Member

    Joined:
    Nov 17, 2009
    Messages:
    273
    Likes Received:
    561
    Location:
    Connecticunt
    You replace the body of it. Substitute the frameset for the body, like this:

    PHP:
    <html>
      <
    head>
      <
    title>Your Title</title>
      </
    head>

      <
    FRAMESET ROWS="*,1" FRAMEBORDER="0" BORDER=0 BORDER="0">
        <
    FRAME SRC="index2.html" NAME="main" SCROLLING=AUTO>
        <
    FRAME SRC="music.html" NAME="hidden" SCROLLING=NO >
      </
    FRAMESET

    </
    html>
    Notice, there is no <body> tag. Your site should start where "index2.html" is and your music page would be "music.html".

    I should also warn you that using any type of frame, whether it be IFrames or standard frames, is going to present complications with SEO. When Google spiders the inlinks of the page, it will list the pages themselves, without the frameset above.
     
    • Thanks Thanks x 1
    Last edited: Mar 22, 2010
  5. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    The code above solved the fluid height and scrolling problem. Yay!! :)

    but the music.html just didn't play at all.

    here's my music.html code looks like:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>RC STUDIO - if you are looking for unusual art objects</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #047E02;
    }
    -->
    </style>
    <script language="JavaScript" src="http://localhost/rcstudio2/images/stories/audio/audio-player.js"></script>
    <object type="application/x-shockwave-flash" data="http://localhost/rcstudio2/images/stories/audio/player.swf" id="audioplayer1" height="24" width="290">
    <param name="movie" value="http://localhost/rcstudio2/images/stories/audio/player.swf">
    <param name="FlashVars" value="playerID=audioplayer1&autostart=yes&leftbg=0x01ab02&rightbg=0x01ab02&track=0xe9bf16&righticon=0x333333&border=0x008001&loop=yes&rightbghover=0x008001&righticonhover=0x333333&bg=0x008001&soundFile=http://localhost/rcstudio2/images/stories/audio/Degung_-_Dikantun_Tugas.mp3">
    <param name="quality" value="high">
    <param name="menu" value="true">
    <param name="wmode" value="transparent">
    </object>
    </head>
    </html>
    and this is my index2.html code:
    Code:
    <html>
      <head>
      <title>Your Title</title>
      </head>
    
      <FRAMESET ROWS="*,1" FRAMEBORDER="0" BORDER=0 BORDER="0">
        <FRAME SRC="http://localhost/rcstudio2/index.php" NAME="main" SCROLLING=AUTO>
        <FRAME SRC="http://localhost/rcstudio2/music.html" NAME="hidden" SCROLLING=NO>
      </FRAMESET> 
    
    
    </html>  
    What's your paypal email? how much should I pay for this?
     
    Last edited: Mar 23, 2010
  6. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    Nevermind. The music is playing now! Woohoo. Is there a way that my music player not hidden? to give visitor the ability to shut down the music if they don't like it.
     
  7. moronic_kaos

    moronic_kaos Regular Member

    Joined:
    Nov 17, 2009
    Messages:
    273
    Likes Received:
    561
    Location:
    Connecticunt
    Yes. You can use the "target" variable in a link code like this:

    PHP:
    <a href="blank.html" target="musicframe">Turn Off Music</a>
    Where the "blank.html" is a blank html file and "musicframe" is the name of the frame that plays your music. What will happen is that the music frame will load a blank file, therefore stopping the music.

    Let me know if it works.
     
    • Thanks Thanks x 1
  8. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    I have created the blank.html:
    Code:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>
    and place "target" code as follows:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
    <meta name="keywords" content="artsofrc.com, rc studio, handmade arts and crafts, art craft shop, art object, unique craft, indonesian handycraft, aneka kerajinan jogja, aneka kerajinan yogyakarta, rudi corens, national artcraft, handicraft indonesia, indonesian crafts, hand made craft, art decorating, crafts suppliers, international arts and crafts, buy arts and crafts, arts and craft centre, arts and craft design, arts and crafts art, unique handy craft, yogyakarta art" />
    <meta name="description" content="RC Studio is a place in Yogyakarta where people can buy unique handicraft, unusual handicraft, unusual art objects, silver jewelry, ethnic jewelry, fantasy jewelry, costume jewelry, home decoration, mask craft, coconut home decoration, boxes baskets and plates, candle stands, lamps, mirrors, paper sculptures, silver table decoration, toys" />
      <title>RC STudio - if you are looking for something unusual</title>
      </head>
    
      <FRAMESET ROWS="*,1" FRAMEBORDER="0" BORDER=0 BORDER="0">
        <FRAME SRC="http://localhost/rcstudio2/index.php" NAME="main" SCROLLING=AUTO>
        <FRAME id="hidden" SRC="http://localhost/rcstudio2/embed_music.html" NAME="hidden" SCROLLING="NO" width="10px" height="30px">
    </FRAMESET>
    
    
    <a href="blank.html" target="hidden">Turn Off Music</a>
    
    </html>  
    but the link just wouldn't show up..
     
  9. moronic_kaos

    moronic_kaos Regular Member

    Joined:
    Nov 17, 2009
    Messages:
    273
    Likes Received:
    561
    Location:
    Connecticunt
    The target link doesn't go in the framset file. It goes in all of your webpages (like index2, and etc).
     
    • Thanks Thanks x 1
  10. jend_sudirman

    jend_sudirman Junior Member

    Joined:
    Sep 18, 2008
    Messages:
    181
    Likes Received:
    86
    Occupation:
    corrupt blackhatter.
    Location:
    corrupt country..
    Okay..wohoooo!!

    I managed to solve the problem thanks to moronic_kaos! :)

    Because I use Joomla, instead of inserting this code:
    Code:
    <a href="blank.html" target="hidden">Turn Off Music</a>
    
    into Joomla's index.php, I insert those code into Joomla Template HTML just below <body> tag.

    I also insert this code:
    Code:
    <a href="http://localhost/rcstudio2/embed_music.html" target="hidden">Turn On Music</a>
    where embed_music.html is my html page which contain the music.

    So now my visitor can turn the music on and off!

    I'm so happy!

    so moronic_kaos..what's your paypal email? I really should pay you on this one.

    PM me!