Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...JS Error when clicking on DNN NAV Menu Item, 6.02JS Error when clicking on DNN NAV Menu Item, 6.02
Previous
 
Next
New Post
12/24/2012 7:54 AM
 

Hello All. 

I get the below error when clicking on a dnn menu item, it prompts the error and then the navigation stops.

SCRIPT5007: Unable to get property 'location' of undefined or null reference 
dnn.js, line 1 character 14223

the menu item get the style of the selected item, but no navigation occurs. 

Thanks in advance.


 
New Post
12/24/2012 12:39 PM
 
Is this a custom skin?



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
12/24/2012 12:46 PM
 

thanx fro ur reply.

yes it is a custom skin i made.

 
New Post
12/24/2012 12:53 PM
 
In that case, I'd need to see the code that you've used to create the menu.

Note that use of the DDR Menu is highly recommended rather than use of the older DNN Nav menu. See the DotNetNuke Wiki for information about DDR. There is a way to use the DDR Menu to replace the Nav menu, so doing that might give you a better place to start.



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
12/24/2012 1:04 PM
 

thank you, actually i'm thinking of moving to the DDR menu in the next project, bu this one .. i have to deliver on time :(

Here's the whole skin markup 

<script type="text/javascript">
    $(document).ready(function () {
        //Remove outline
        var links = document.getElementsByTagName('a');
        for (var i = 0; i < links.length; i++) {
            links[i].onmousedown = function () {
                this.blur();
                return false;
            }
            links[i].onclick = function () {
                this.blur();
            }
            if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
                links[i].onfocus = function () {
                    this.blur();
                }
            }
        }
        /*Search Text Box*/

        $('#dnn_dnnSEARCH_txtSearch').val('  Search');
        $('#dnn_dnnSEARCH_txtSearch').focus(function () {
            if ($('#dnn_dnnSEARCH_txtSearch').val() == '  Search') {
                $('#dnn_dnnSEARCH_txtSearch').val('');
            }
        });

        $('#dnn_dnnSEARCH_txtSearch').focusout(function () {
            if ($('#dnn_dnnSEARCH_txtSearch').val() == '') {
                $('#dnn_dnnSEARCH_txtSearch').val('  Search');
            }
        });

        var title = document.title;
        if (title.indexOf('Search Results') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-searchresults.jpg');
        else if (title.indexOf('ENF Login') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Login.jpg');
        else if (title.indexOf('News') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-News.jpg');
        else if (title.indexOf('Media Gallery') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-MediaGallery.jpg');
        else if (title.indexOf('Program') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Programs.jpg');
        else if (title.indexOf('Partners') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Partners.jpg');
        else if (title.indexOf('Education') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Education.jpg');
        else if (title.indexOf('Stories') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Stories.jpg');
        else if (title.indexOf('Youth') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Youth.jpg');
        else if (title.indexOf('About') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-About.jpg');
        else if (title.indexOf('Involved') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Involved.jpg');
        else if (title.indexOf('Events') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Events.jpg');
        else if (title.indexOf('Publications') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Publications.jpg');
        else if (title.indexOf('Employment') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Employment.jpg');
        else if (title.indexOf('Contact') != -1)
            $('#imgBG').attr('src', '/ENF/portals/0/insideimages/inside-Contact.jpg');
        else {
            ;
        }
    });

</script>

<img class="background" id="imgBG" src="/ENF/portals/0/home-top-bg1.jpg" style="display: inline;" />
<div id="ControlPanelWrapper">
    <dnn:CONTROLPANEL runat="server" ID="cp" IsDockable="True" />
</div>
<div style="clear: both;">
</div>
<div class="full_width">
    <div class="menu_container">
        <div class="wrapper">
            <div class="top_menu">
                <div class="nuqol_logo">
                    <a href="/ENF">
                        <img src="/ENF/Portals/_Default/Skins/ENF-home-en/Images/nuqol_logo.png" width="198"
                            height="62" /></a>
                </div>
                <div class="nuqol_top_menu">
                    <dnn:NAV runat="server" ID="NAV3" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false"
                        ControlOrientation="Horizontal" CSSContainerSub="SubMenu" CSSControl="mainMenu">
                    </dnn:NAV>
                </div>
            </div>
        </div>
    </div>
    <div style="clear: both;"></div>
    <div class="wrapper">
        <div class="left_modules">
            <div class="quick_links">
                <dnn:NAV runat="server" ID="NAV1" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false"
                    ControlOrientation="Vertical" CSSContainerSub="SubMenu" CSSControl="LeftMenu"
                    StartTabId="106">
                </dnn:NAV>
            </div>
            <div style="clear: both;"></div>
            <div class="search_container">
                <dnn:SEARCH runat="server" ID="dnnSEARCH" CssClass="ServerSkinWidget" UseDropDownList="false"
                    ShowSite="false" ShowWeb="false"
                    Submit="<img  style=width:31px;height:35px;margin-left:-7px;position:relative;top:-1px;left:-3px; src=&quot;images/search-button.jpg&quot; border=&quot;0&quot; alt=&quot;Search&quot; /&gt;" />

            </div>
            <div style="clear: both;"></div>
            <div class="get_involved_module" id="Get_Involved" runat="server"></div>
            <div style="clear: both;"></div>
            <div class="quote_module" id="Quote" runat="server"></div>
        </div>
        <div style="float: left;">
            <div style="float: left; margin-top: 12px; margin-bottom: 12px;">
                <dnn:BREADCRUMB ID="bc" runat="server" RootLevel="0" Separator=" >> " />
            </div>
            <div style="clear: both;"></div>
            <div class="center_modules">
                <div class="news_module" id="ContentPane" runat="server"></div>
            </div>
        </div>
    </div>
    <div style="clear: both;"></div>
    <div class="footer_container">
        <div class="footer_text">
            Designed & Developed by <a href="http://www.primus.com.jo" target="_blank">Primus</a>
            - A division of Computer Networking Services (CNS). 
                    Copyright &copy; 2012. <b>Elia Nuqul.</b> All Rights Reserved.
        </div>
        <div class="follow_buttons">
            <div style="float: left; margin-right: 8px; margin-top: 3px\9;">Follow Us</div>
            <div style="float: left; margin-right: 8px;">
                <a href="#">
                    <img src="/ENF/portals/0/twitter.png" width="18" height="18" /></a>
            </div>
            <div style="float: left;">
                <a href="#">
                    <img src="/ENF/portals/0/fb.png" width="18" height="18" /></a>
            </div>
        </div>
    </div>
</div>

Thanks again

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...JS Error when clicking on DNN NAV Menu Item, 6.02JS Error when clicking on DNN NAV Menu Item, 6.02


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out