javascrip error and License Sync

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

javascrip error and License Sync

Post by tranmkp »

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 ... =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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: javascrip error and License Sync

Post by Ruth »

I've posted this to Milonic.

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: javascrip error and License Sync

Post by Andy »

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

-- Andy
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

Re: javascrip error and License Sync

Post by tranmkp »

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,
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: javascrip error and License Sync

Post by Ruth »

Hi,

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

Ruth
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

Re: javascrip error and License Sync

Post by tranmkp »

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://websites.milonic.com/"+ 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?
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

Re: javascrip error and License Sync

Post by tranmkp »

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?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: javascrip error and License Sync

Post by Ruth »

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://milonic.com/support/

Ruth
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

Re: javascrip error and License Sync

Post by tranmkp »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: javascrip error and License Sync

Post by Ruth »

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: Select all

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
tranmkp
Beginner
Beginner
Posts: 6
Joined: Wed Oct 01, 2008 4:02 pm

Re: javascrip error and License Sync

Post by tranmkp »

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
Post Reply