Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Upstate New York
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile mouseover code- need help!

    Could someone PLEASE help me with my mouseover page? There are only two in the bottom right of the (upper) box that actually work. Also, how do I add a music code and where PLEASE.? Thank you in advance!
    <html>
    <head>
    <title>Jameson</title>

    <script>
    <!--
    if (parent.frames.length > 0) {
    parent.location.href = self.document.location
    }

    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.0
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>



    <div align="center"><b> <br>
    </b>
    <table width="75%" border="1" bgcolor="blue">
    <tr>
    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd27.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image1','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd29.jpg',1)"><img name="Image1" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd27.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd1.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image2','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd35.jpg',1)"><img name="Image2" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd1.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd3.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image3','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd89.jpg',1)"><img name="Image3" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd3.jpg" width="228" height="280"></a></td>
    </tr>
    <tr>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd16.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image4','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd28.jpg',1)"><img name="Image4" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd16.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/pic10.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image5','','C:\SlideShowPhotos_Scrapbook Pics Resized/pic2.jpg',1)"><img name="Image5" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/pic10.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/pic3.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image6','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd29.jpg',1)"><img name="Image6" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/pic3.jpg" width="228" height="280"></a></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    <b> </b></div>
    </html>
    <html>
    <head>
    <title>:::::::::::::::::</title>

    <script>
    <!--
    if (parent.frames.length > 0) {
    parent.location.href = self.document.location
    }

    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.0
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>



    <div align="center"><b> <br>
    </b>
    <table width="75%" border="1" bgcolor="blue">
    <tr>
    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd30.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image1','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd50.jpg',1)"><img name="Image1" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd30.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd48.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image2','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd89.jpg',1)"><img name="Image2" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd48.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd50.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image3','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd9.jpg',1)"><img name="Image3" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd50.jpg" width="228" height="280"></a></td>
    </tr>
    <tr>
    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/pic4.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image4','','C:\SlideShowPhotos_Scrapbook Pics Resized/pic6.jpg',1)"><img name="Image4" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/pic4.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/impd01.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image3','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd9.jpg',1)"><img name="Image3" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/impd01.jpg" width="228" height="280"></a></td>

    <td><a href="C:\SlideShowPhotos_Scrapbook Pics Resized/pic12.jpg"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('Image3','','C:\SlideShowPhotos_Scrapbook Pics Resized/impd9.jpg',1)"><img name="Image3" border="0"
    src="C:\SlideShowPhotos_Scrapbook Pics Resized/pic12.jpg" width="228" height="280"></a></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    <b> </b></div>
    </html>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Chachi,
    • Didn't you have a site somewhere (i forgot the URL) so people can see the actual page online? That Dreamweaver code is giving me headaches... Moreover, if there are any faults in the code, a browser will show information that might help solving the problem.
    • This thread is liable to be moved to one of the scripting categories, since this tends to be a scripting question. Not sure though, so i replied anyway.
    • Can't help you on the music... sorry... You could try a search on the old forum, 'cause i'm positive this subject came up before there.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Upstate New York
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    putting code on site

    ronaldb66,

    I am truly sorry because I sure know what you mean about "a headache" from that code, I went and put it on my site even though it's wrong and I'll work with it from there. Thanks for advising me to do so because I would have not known that. You know what I do? and I can see now that it's wrong, I don't put it ON my site UNTIL it's right, well, I should say I don't "publish" it until it's right..

    If I may ask another question PLEASE? I have been putting some of my folder contents on a floppy, such as my slideshow, why is it that it works perfectly fine within the folder, if I click "open" I can see the slideshow just fine and hear the music, NOW, when I put it on my site or click on it from my floppy disk it doesn't work? I should say I can hear the music and see the title and see the outline of the box but no pics, I only see a tiny red x in the upper left corner of the box.
    Thanks again!

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Chachi,

    that's probably a URL thing. If a file, be it an image or music, or in fact a page, is addressed relatively, like:
    Code:
    <img src="images/myimage.gif" />
    (just an example), the URL the browser constructs will be relative to the location where the page resides. If that's not where the image is, you'll get the red cross you mentioned (broken link).
    If you use a full URL however, like:
    Code:
    <img src="http://www.mydomain.com/images/myimage.gif" />
    the browser will find the image on the fully specified location no matter where the page is at the moment.

    If you are not clear on this, see if you can copy & paste the bits of code concerning the images that don't show, so people can take a look at it.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Upstate New York
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    URL source

    Now I know exactly what you mean, that was very helpful!!
    Thanks a million!! I'll go re-check the whole thing.

  • #6
    New Coder
    Join Date
    Jun 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A "note" on music...

    (sorry for the bad pun)

    javascriptkit.com has a couple of great scripts for adding musin in a variety of ways to your page. You were not too specific as to what kind of music, or how you wanted it added, so I couln't give you any specifics, but once you are that the javascriptkit site and chouse 'sound and multimedia scripts' (or whatever), you should be well on your way.

  • #7
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Upstate New York
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    music within the code

    jmacmillan,

    Enjoyed the pun! Thanks for the heads up here about the URL to javascript.com, I'll have a look there, I am actually looking for a code to put on the first page to continue playing throughout the site, just one song. I will also remember to be more to the point with my questons, it was a vague question, but thanks to people like yourself and others here I am learning. Thanks for the URL and for your help!

    P.S. I never dreamed there were so MANY codes, I sure have my work cut out for me, LOL

  • #8
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The DOM doesn't talk about the window because the DOM is targeted at document handling, not UI handling. You might have to be able to reference the viewport from the document to determine some properties of it, though, and that's why it exists in the DOM at all. And so thanks for your kind information. I like your blog very much because of its interesting topics. i'm student and preparing for my exam of testking 70-272 for attaining the certification. Although it is not hard to get certified but it keeps me busy. I've also attained certification of another course of testking 70-640 which I had passed last three months back. Also I am trying to complete my pending thesis project of testking JN0-303 which I'm sure will be completed soon. I normally search on topics which you described on your blog these are great and really informative. Thanks for beneficial thread.


  •  

    Posting Permissions

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