PDA

View Full Version : ddsmoothmenu javascript error when entering login.aspx



alfresco
10-21-2010, 04:21 PM
1) Script Title:
ddsmoothmenu javascript error when entering login.aspx

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem:

I'm using a horizontal Smooth navigational Menu in Visual Web Developer 2010 and it works perfect in any pages. but when I click on the login link and go to the default login.aspx page, I get the following error:
Microsoft JScript runtime error: 'parent().get(...)' is null or not an object
which points to this line:
ddsmoothmenu.buildmenu($, setting)
I've red other threads and tried their solutions like removing
the extraneous .init function. but didn't work for me.

I really appreciate your help. thanks

alfresco
10-21-2010, 07:21 PM
I fixed the problem!...the problem came through the referencing, because I was referening an external htm file for the menu items. so the correct refferencing is:


contentsource: ["container_id", '<%= Page.ResolveUrl("~/menu.htm")%>']

Now, the menu comes up in the login page, but the two arrows don't appear. here is the problem of referening again. but it's different now, cuz I need to make the refferences for the two arrows within the .js file and the above referening style doesn't work there.

This is what I need to fix:

//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: { down: ['downarrowclass', 'Images/down.gif', 23], right: ['rightarrowclass', 'Images/right.gif'] },

Any other page can reference these images, except the login page.

ddadmin
10-21-2010, 11:45 PM
Thanks for the update and providing the solution. :)

alfresco
10-22-2010, 04:55 AM
No problem. But as I said, I'm still having problem with the login page because the arrow images don't appear and I don't know how to fix it.

The thing is the reference to the images doesn't work in the login page.


arrowimages: { down: ['downarrowclass', 'Images/down.gif', 23], right: ['rightarrowclass', 'Images/right.gif'] },

And this is the path of the image in the login page:
http://localhost:4185/Account/Images/down.gif

I'd appreciate your help. Thanks

ddadmin
10-22-2010, 07:22 AM
The best way to define the image paths is just to use absolute paths to the images, so something like:


arrowimages: { down: ['downarrowclass', 'http://localhost:4185/Account/Images/down.gif', 23], right: ['rightarrowclass', 'http://localhost:4185/Account/Images/right.gif'] },