[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => roudh webforumsuser@macromedia.com [ip] => "roudh" webforu [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> > > > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Murray *TMM* [ip] => forums@HAHAgrea [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Redundent Code - Macromedia Dreamweaver

Redundent Code - Macromedia Dreamweaver

Hi, What does this do? I tried to delete it but then when I previewed in Iexplore, it said 'run time error' - luckily I didn't save the page! <SCRIPT language=JavaScript type=text/JavaScript> <!-- function MM_preloadImages() { //v3.0 var d=doent; 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.01 var p,i,x; if(!d) d=doent; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].doent; 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].doent); if(!x && d.getElementById) x=d.getElementById(n); return x; } //--> </SCRIPT> <SCRIPT language=JavaScript type=text/JavaScript> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) ...

  1. #1

    Default Redundent Code

    Hi,

    What does this do? I tried to delete it but then when I previewed in Iexplore, it said 'run time error' - luckily I didn't save the page!
    <SCRIPT language=JavaScript type=text/JavaScript>
    <!--


    function MM_preloadImages() { //v3.0
    var d=doent; 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.01
    var p,i,x; if(!d) d=doent; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].doent; 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].doent);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    //-->
    </SCRIPT>
    <SCRIPT language=JavaScript type=text/JavaScript>
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(pInt(appVersion)==4)) {
    doent.MM_pgW=innerWidth; doent.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=doent.MM_pgW || innerHeight!=doent.MM_pgH) location.reload();
    }
    MM_reloadPage(true);

    function MM_nbGroup(event, grpName) { //v6.0
    var i,img,nbArr,args=MM_nbGroup.arguments;
    if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
    img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
    if ((nbArr = doent[grpName]) == null) nbArr = doent[grpName] = new Array();
    nbArr[nbArr.length] = img;
    for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
    if (!img.MM_up) img.MM_up = img.src;
    img.src = img.MM_dn = args[i+1];
    nbArr[nbArr.length] = img;
    } }
    } else if (event == "over") {
    doent.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
    if (!img.MM_up) img.MM_up = img.src;
    img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
    nbArr[nbArr.length] = img;
    }
    } else if (event == "out" ) {
    for (i=0; i < doent.MM_nbOver.length; i++) {
    img = doent.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
    } else if (event == "down") {
    nbArr = doent[grpName];
    if (nbArr)
    for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    doent[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
    if (!img.MM_up) img.MM_up = img.src;
    img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
    nbArr[nbArr.length] = img;
    } }
    }
    //-->
    </SCRIPT>


    roudh webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Redundent Code

    roudh:

    Why would you want to delete it? It's required for the functionality of
    your page, as you have discovered.

    function MM_preloadImages = image preloading
    function MM_findObj = used internally by other behaviors
    function MM_reloadPage = forcees NN4x to reload the page if the viewport is
    resized
    function MM_nbGroup = enables your navigation menu functionality

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver MX
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]news://forums.macromedia.com/macromedia.dreamweaver[/url] - THE BEST WAY TO GET
    ANSWERS
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.DreamweaverFAQ.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "roudh" <webforumsusermacromedia.com> wrote in message
    news:bf42mv$bt$1forums.macromedia.com...
    > Hi,
    >
    > What does this do? I tried to delete it but then when I previewed in
    Iexplore, it said 'run time error' - luckily I didn't save the page!
    > <SCRIPT language=JavaScript type=text/JavaScript>
    > <!--
    >
    >
    > function MM_preloadImages() { //v3.0
    > var d=doent; 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.01
    > var p,i,x; if(!d) d=doent;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    > d=parent.frames[n.substring(p+1)].doent; 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].doent);
    > if(!x && d.getElementById) x=d.getElementById(n); return x;
    > }
    > //-->
    > </SCRIPT>
    > <SCRIPT language=JavaScript type=text/JavaScript>
    > <!--
    > function MM_reloadPage(init) { //reloads the window if Nav4 resized
    > if (init==true) with (navigator) {if
    ((appName=="Netscape")&&(pInt(appVersion)==4)) {
    > doent.MM_pgW=innerWidth; doent.MM_pgH=innerHeight;
    onresize=MM_reloadPage; }}
    > else if (innerWidth!=doent.MM_pgW || innerHeight!=doent.MM_pgH)
    location.reload();
    > }
    > MM_reloadPage(true);
    >
    > function MM_nbGroup(event, grpName) { //v6.0
    > var i,img,nbArr,args=MM_nbGroup.arguments;
    > if (event == "init" && args.length > 2) {
    > if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
    > img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
    > if ((nbArr = doent[grpName]) == null) nbArr = doent[grpName] =
    new Array();
    > nbArr[nbArr.length] = img;
    > for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i]))
    != null) {
    > if (!img.MM_up) img.MM_up = img.src;
    > img.src = img.MM_dn = args[i+1];
    > nbArr[nbArr.length] = img;
    > } }
    > } else if (event == "over") {
    > doent.MM_nbOver = nbArr = new Array();
    > for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) !=
    null) {
    > if (!img.MM_up) img.MM_up = img.src;
    > img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
    args[i+1] : img.MM_up);
    > nbArr[nbArr.length] = img;
    > }
    > } else if (event == "out" ) {
    > for (i=0; i < doent.MM_nbOver.length; i++) {
    > img = doent.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
    img.MM_up; }
    > } else if (event == "down") {
    > nbArr = doent[grpName];
    > if (nbArr)
    > for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src =
    img.MM_up; img.MM_dn = 0; }
    > doent[grpName] = nbArr = new Array();
    > for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) !=
    null) {
    > if (!img.MM_up) img.MM_up = img.src;
    > img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
    > nbArr[nbArr.length] = img;
    > } }
    > }
    > //-->
    > </SCRIPT>
    >
    >

    Murray *TMM* Guest

Similar Threads

  1. Why doesn't the Code Completion occur in FlexBuilder IDEwhen source code is in an external file?
    By DuffyVector123 in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 25th, 01:39 PM
  2. Custom control fires event but ignores some code in the code behind file
    By recoil@community.nospam in forum ASP.NET Building Controls
    Replies: 0
    Last Post: March 8th, 05:17 PM
  3. Passing code/data from code-behind to ASPX page
    By A. Atienza in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: December 8th, 06:29 PM
  4. Replies: 0
    Last Post: February 9th, 05:26 PM
  5. Replies: 0
    Last Post: July 11th, 06:27 PM

Bookmarks

Posting Permissions

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