CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Simple Vertical Menu Does Nothing

Print topic Send  topic

Author Message
PCHome

Posts: 54
Posted: 01/21/2014, 2:11 PM

I created a simple static vertical menu with a couple entries and they look okay in the page source code but clicking on any one goes nowhere. It changes color and stays that way but nothing else happens. How do I get it to work?
View profile  Send private message
eratech


Posts: 513
Posted: 01/21/2014, 6:38 PM

If you used the Menu Builder, did you fill in the URL field to point to the .CCP file of the page (not the HTML)

Also, is the URL in the page source code (this is the published site right?) all correct - that is, can you copy-paste the URL into a browser url and it works?

Finally, I have noticed sometimes that the link itself can be over the text only not over the entire 'box'

E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
PCHome

Posts: 54
Posted: 01/21/2014, 7:14 PM

Yes, the links work by themselves and they look okay in the source code too. If they were wrong, I would get a Page Not Found error rather than nothing at all. I am neither a newbie to Web programming nor to CCS but I have never used its Menu builder feature before, favoring SoThink's DHTMLMenu instead. For this very simple site, however, DHTMLMenu seemed overkill.
View profile  Send private message
PCHome

Posts: 54
Posted: 01/21/2014, 9:02 PM

Just a follow-up. Here is the source code of the menu which, as you can see, is nothing special. Clicking on anything, though, seems to want to invoke some Javascript for some unknown reason and somehow that's probably where the problem is but any attempt to edit it manually is simply wasted as it immediately reverts:

<div class="MenuStyle" id="MenuContainer" align="right">  
<ul class="adxm menu_vlr_tree level1">   
<li><a href="index.php" class="" target="" title="List Entries">List Entries</a></li>  
<li><a href="editlist.php" class="" target="" title="Edit Multiple Entries">Edit Multiple Entries</a></li>  
<li><a href="login.php?Logout=1" class="" target="" title="Logout">Logout</a></li>  
</ul>  
</div>

All pages are in the same folder as the menu so no need for a path.
View profile  Send private message
eratech


Posts: 513
Posted: 01/21/2014, 9:25 PM

Ok - sorry for the assumption. I've seen too many basic questions that need to be answered with "Did you do the obvious?"

I haven't see the problem you describe, but it seems ok comparing your links (and class="" target="" etc) to my menus.

Strange it's trying to run JS on click - I've just checked through one of my menus (created with CCS 5.1 so using the jQuery plug-ins) and there is no extra onclick method on the <a> or <li> tags.

The only problem I've had with the Menus is on *some* pages it might not generate the links and left all the links pointing to the current page. Usually a re-generate and publish fixes that.

Please let me know if you figure it out, and again, sorry.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
PCHome

Posts: 54
Posted: 01/22/2014, 12:25 AM

It's no problem and I would have made the same assumption.

I discovered that if I make a subtle change, it works even though it looks terrible. I don't totally understand what the menu builder does, or "thinks" it's doing, so I can't figure out the significance of the discovery. This code is in the head tags and if I purposely break it, then the menu works but I can no longer see what I'm clicking on. By default it is like this for a menu called "Menu":

//Plugin Calls @1-9CB5F974  
 $('*:ccsControl(MenuContainer)').ccsBind(function() {  
  this.ccsMenu();  
 });  
//End Plugin Calls

On the above, when I place the cursor over any of the menu items, it shows "javascript: ;" at the bottom of the browser (Firefox) as the destination. But if I break it like this:

//Plugin Calls @1-9CB5F974  
 $('*:ccsControl(MenuContainer)').ccsBind(function() {  
  this.ccsMenu1();  
 });  
//End Plugin Calls

I can't see what the cursor is over but moving it about shows the actual URLs and they work so clearly there is javascript involved somehow even though I didn't specifically use any. There are no onclicks or anything else like that showing in the code either. I have generated the pages and the entire site many times but the menus still do not work.
View profile  Send private message
PCHome

Posts: 54
Posted: 01/22/2014, 12:46 AM

Further tests show that if I remove the Design from the page, the menu works even though it looks terrible. It is not using any specific Design but it is using a Style and CCS isn't clear on the difference. Somehow the design, which I didn't specify from the few available, is causing the issue but how does one apply a Style without any Design? They seem one and the same to me and I see no option for "none" on the Designs.
View profile  Send private message
eratech


Posts: 513
Posted: 01/22/2014, 5:54 PM

I'm not familiar with the jQuery stuff in 5.1 - it was a different menu JS previously.

Style vs Design - if I'm using a menu in a Header includeable file, I usually don't add any styles as the page loads them. But there is usually a Style of 'none' and I think you can put it on the Component (menu) not the whole Page.

Designs - I suppose it's one of the 5.1 changes that I haven't dug too deep into yet - I spent 4 years on CCS 4 so some habits are hard to break. I tend to still use the (ugly) Styles as most of my jobs are for intranets or business apps where it just needs to be neat, not pretty.

But I have done a plain static menu in 5.1 for a recent project and haven't had the problems you have, so it does work (usually)

Don't you love those little jobs - in any website - such as "build a 4 item static menu" that just take far longer than expected....
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
PCHome

Posts: 54
Posted: 01/22/2014, 6:25 PM

I made a jump from 3.X to 5.0 (and now 5.1) but I started in CCS with the early Beta versions before 1.X and that was after using the non-Studio CodeCharge for a couple sites. Of course, I've created many sites manually using a simple text editor in different languages too.

As for Designs and Styles, I am using a Style for this simple, mostly non-public site that is just a wine inventory of our "collection" so that we can keep track of what's stored where (it's at http://wine.pc-homepage.com/ if you want to see the menu). I don't want a Design but "none" isn't a choice in 5.1 - the closest being "Simple (Default)" which really tells me nothing and the Remove button is grayed out so there is no way to even get rid of it.

I did nothing to say that I wanted to use jQuery yet CCS seems to take it upon itself to add all sorts of unwanted JavaScript and other nonsense and I see no way to prevent it. If I delete the code, it returns instantly which is a very bad thing. I wish there were a way to force it to give good, clean PHP which is what I selected in the settings, I also wish it could generate pages with DIVs rather than using all the obsolete TABLE junk. It also uses lots of depreciated PHP functions that give errors when I enable them on my development system so I need to leave them disabled unless looking for a specific issue.

However, still no luck in getting the menus to work so I may back up and redo this site manually as that seems the only way to make it work. It was supposed to be a "quickie" but I've spent more time fighting CCS than if I had just done it manually in the first place!
View profile  Send private message
eratech


Posts: 513
Posted: 01/24/2014, 6:57 PM

Yeah - I think much of the jQuery stuff replaced the prototypejs from pre 5.0 versions. I'm glad it's jQuery, but some of the code is dastardly to debug.

I notice that in 5.0+ there are additional template options when making grids, records etc - instead of just the Horizontal/Vertical/Justified there is the option to select another temple, so I suspect you could make your own Template with DIV's and put it in there.

I've battled with CCS, but then again I've battled with Dreamweaver and Visual Studio over the years, so settled for the speed CCS gave, and the occasional "WHY?!" screams in the night....

E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
PCHome

Posts: 54
Posted: 01/26/2014, 1:13 PM

I noticed in the Project Explorer a setting that does not appear in the Settings panels: "Publish JS Library". It was set to "Yes" so I changed it to "No", deleted the js folder, and published the project. It did not recreate the js folder and now the menus work after a fashion but they have lost all their Styles which, for some extremely odd reason, were coming from the JavaScript rather than from the CSS. Now the buttons are very narrow and, after clicking on an item, it becomes red text against a red background. Clearly the Menu Builder is not "ready for Prime Time" and should never have been included until all the bugs had been worked out. Therefor I'll remove these menus and put in my own DHTML Menus instead.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.