Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:15

javascrip error and License Sync


Poster: tranmkp
Dated: Tuesday October 21 2008 - 23:05:39 BST

Kevin has been really helpful but things are buggered up now - Kevin was helping me with my menu. We have a javascript event -
before melonic: ONCLICK = "urlSubstitution('transco/sheet.asp?stype=0')"
Kevins implementation: see below

with(milonic=new menuname("Tariff")){
style=menuStyle;
aI("text=Title Page;url=javascript:urlSubstitution('transco/sheet.asp?stype=1');target=mainFrame");
aI("text=Table of Contents;url=http://gaspipeline.williams.com/transco/sheet.asp?stype=1;target=mainFrame");
}
++++++++++++++++++++++++++++++=end Kevins exeample ++++++++++++++++++++++++++++++++++
Kevin sent me a menu_data.js file. I used this file with the public download on the menus - notice that the second line, it is hard coded to the file. The first line, not visible as the MIlonic is the first menu. So, I logged onthe site and downloaded the version that is supposed to remove the milonic links. It did, although when I view the js files it still says unlicened 1000. It did remove the milonic links. However, after changing all the code to the new version I receive "Unterminated String Constant"

I am using the menu in an iFrame see below:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>iFrame Test</title>

<!--oct 20 4:34 -->

<script LANGUAGE = "JavaScript" SRC = "./urlSub.js"> </script>

<script LANGUAGE = javascript>
function open1LineLoginWindow(url)
{
window.open(url, "mywindow", "toolbar=no, resizable=yes, status=yes, scrollbars=yes");
}
</script>
</head>

<body>

<table width="970" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF">this is where the title graphic will go</td>
</tr>

<td bgcolor="#0000FF">this will just be a blue separator</td>
</tr>


<td> <!-- start milonioc -->

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>

<!-- end milonic --></td>
</tr>
<tr>
<td align="center">
<iframe id="portalFrame"
name="portalFrame"
src="/webbi/ebb/new_transco_9_26.jsp"
scrolling="no"
marginwidth="0"
marginheight="0"
frameborder="1"
vspace="40"
hspace="0"
style="overflow:visible;
width:1024px;
height:1000px">
</iframe>
</td>
</tr>
</table>
</body>
</html>
+++++++++++++++++++++++++==end iFrame example ++++++++++++++++++++++++

so what gives? I believe in the beginning it was really working, I think it was working BEFORE I downloaded the Lic version. Please help: I am begging to get squeezed...

cheers

Re: javascrip error and License Sync


Poster: Ruth
Dated: Wednesday October 22 2008 - 5:50:30 BST

I've posted this to Milonic.

Ruth

Re: javascrip error and License Sync


Poster: Andy
Dated: Wednesday October 22 2008 - 12:21:04 BST

If you haved a URL that we can see we shouold be able to provide an accurate answer to the problem.

-- Andy

Re: javascrip error and License Sync


Poster: tranmkp
Dated: Wednesday October 22 2008 - 16:34:02 BST

Ive uploaded work files to another site - you can test functionality - but not actuall targetsa because of the firewall

http://www.artshot.net/test/iframsttest.html


choose - Nave Menu > Tariff > Title Page (produces an "object expected" error.

choose - Nave Menu > Tariff > Title Page > Table of Contents (produces "unterminated string constant"...

hope this helps,

Re: javascrip error and License Sync


Poster: Ruth
Dated: Wednesday October 22 2008 - 19:06:20 BST

Hi,

The file urlSub.js doesn't seem to be there so I can't test anything

Ruth

Re: javascrip error and License Sync


Poster: tranmkp
Dated: Wednesday October 22 2008 - 19:45:03 BST

urlSub references inside the firewall - wont be able to test the actual file. If we can just eliminate the javascript error...

here is the code for urlSub

var url_base = "gaspipeline.williams.com";
function urlSubstitution(url_in)
{
parent.frames['rightPane'].location.href = "http://"+ url_base + "/" + url_in;
}

Ok, I think I know whats going on, I think.... the above code is before the iFrame implementation - before we had a frameset (http://www.1line.williams.com/Files/Tra ... meset.html. So the code is referencing the "parent and target "rightPane.

The iFrame implementation uses -
<iframe id="portalFrame"
name="portalFrame"
src="/webbi/ebb/new_transco_9_26.jsp"
scrolling="no"
marginwidth="0"
marginheight="0"
frameborder="1"
vspace="40"
hspace="0"
style="overflow:visible;
width:1024px;
height:1000px">
</iframe>

so it looks like my syntax is of in the urlSub. So, is so, how do I reference the iFrame?

Re: javascrip error and License Sync


Poster: tranmkp
Dated: Thursday October 23 2008 - 1:25:41 BST

So I change the code in the urlSub to reflect the iFrame structure - Nope...

var url_base = "gaspipeline.williams.com";
function urlSubstitution(url_in)
{
parent.getElementById['portalFrame'].src = "http://"+ url_base + "/" + url_in;
}


well?

Re: javascrip error and License Sync


Poster: Ruth
Dated: Thursday October 23 2008 - 7:47:56 BST

I've posted to Milonic to make sure they realize you've put up a page. I don't know anything about functions, so I can't help with this. Also, you might try posting to the beta support if you have a licensed menu. http://www.milonic.com/support/

Ruth

Re: javascrip error and License Sync


Poster: tranmkp
Dated: Monday October 27 2008 - 18:45:07 GMT

on another note -

Is there a way to add horizontal spacing on the Parent menu WITHOUT affecting the spacing between the dropdown subMenus?

for example

Re: javascrip error and License Sync


Poster: Ruth
Dated: Tuesday October 28 2008 - 14:12:05 GMT

Hi,

The easiest way would be to use two styles using copyOf to create the second one; one would be for the main one for the subs. So, if you change your padding in the menuStyle to padding="4px 8px 4px 8px" and then add this to your data file right after the closing } of the menuStyle


Code:
subStyle=new copyOf(menuStyle);
subStyle.padding=4;


You'd then change the style=menuStyle; in all the submenus to subStyle.

That method lets the main menu have padding of top and bottom 4 and left and right 8 while keeping the padding at 4 for the submenus. This is the easiest method when you want the main and subs to be pretty much the same and are only changing one or two things in the styles for the subs.

Ruth

Re: javascrip error and License Sync


Poster: tranmkp
Dated: Monday November 3 2008 - 20:39:54 GMT

I have decides that the issue i am having is not really a Milonic issue as it is a DOM issue and javascript -

on the other hand - after searching the site - only finding one post -

How does on resolve the flickering with dropdowns when a pdf is loaded into the browser?


cheers