/    Sign up×
Community /Pin to ProfileBookmark

JS menu no longer rendered correctly in Chrome

My web site is https://www.garynancy.com/index.html

I have been using AllWebMenus from Likno software to build the menus for my web site. It has worked well for several years (other than one glitch in 2016). I recently noticed that my menus are not rendered correctly in the Chrome browser. They have previously been rendered correctly in Chrome. However, the menus are still rendered correctly in MS Edge and Firefox. Different computers and with different operating systems reveal the same results. I suspect that a recent Chrome update has caused an incompatibility. The menu system uses Javascript scripts. I have other Javascript routines on the web site that render and magnify photos and that script works well. The Likno site is still working but the AllWebMenus program has not been updated since 2014 and e-mail to their support line goes unanswered. Therefore, I suspect that they are inactive or out of business.

Does anyone have any idea of what may be causing this problem?

to post a comment
JavaScript

23 Comments(s)

Copy linkTweet thisAlerts:
@VITSUSAOct 23.2019 — @dsscottage#1610286 Can you please share any snapshot which will help to understand what you want exactly?
Copy linkTweet thisAlerts:
@SempervivumOct 23.2019 — @VITSUSA#1610299 The TO posted a link to his site. The issue is visible easily when hovering the menu buttons on top.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 23.2019 — If you don't look at the web site in both Chrome and another browser, maybe the issue isn't obvious.

The first image is the incorrectly rendered menu. The second is how it is supposed to look.

[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-10-23/1571836059-598077-menu1.jpeg]

[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-10-23/1571836079-444573-menu2.jpeg]
Copy linkTweet thisAlerts:
@VishnuyogalifestyleOct 24.2019 — Great post, very insightful thanks for sharing. Visit my website for more at :

[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-10-24/1571915878-984798-image.png]


Link removed by Site Staff so it doesn't look like you're spamming us. Please don't post them again.
Copy linkTweet thisAlerts:
@KeverOct 24.2019 — I might be wrong, but I don't think you'll find anyone willing to figure out why a obfuscated script from the late 90's, with obscure variable and function names is acting strange. Especially since there are no errors pointing towards a certain direction. If I were you I would take my loss and update to a modern CSS only menu.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 24.2019 — @Kever#1610350

I'm not a CSS or Javascript programmer. Do you have a recommendation for a good replacement for AllWenMenus?
Copy linkTweet thisAlerts:
@dsscottageauthorOct 24.2019 — More info....

Some time ago, I looked at a number of CSS menu applications but as I recall, all of them required that their code be placed in every page on the site. I have many pages and update the site frequently with new locations. I'd be looking for a menu app that allowed me to change one central file on the site to make menu changes. (Obviously each page would need to link to that file but I wouldn't have to change that link every time the menu was modified).
Copy linkTweet thisAlerts:
@SempervivumOct 24.2019 — @dsscottage#1610354 I'd be looking for a menu app that allowed me to change [b]one central file[/b] on the site to make menu changes.[/quote]No problem, there is procedure that is commonly used: Place the code of the menu in one central file and include it by PHP on each page. Thus you need to change one file only and the menu will be up to date on all pages where it is included.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 25.2019 — Thank you for the reply and suggestion. I've just been trying to do exactly as you suggest but PHP is very new to me. Could I be so bold as to ask to be pointed in the right direction?

I started to rebuild my site using this method but when I try to locally open my page (index,php for example) in Chrome, It opens the code rather than rendering the code. If I upload the code to my web server, it renders correctly. After a little investigation, I tried the program Rapid PHP and it will locally render correctly within the RapidPHP preview window. However, I have links within pages that open a photo in a popup. This doesn't work in Rapid PHP. Instead, the intended popup page opens a window asking if I want to open or save the popup. (the popup is just a standard link opening in a new window).

Is there a better way to build and debug my PHP pages locally before I upload it?
Copy linkTweet thisAlerts:
@SempervivumOct 25.2019 — Unfortunately I'm not experienced in using RapidPHP - the first time I heard about this editor. Obivously it has a built in preview function and this preview behaves different than common browsers.

Regarding the popups: When I viewed your site first I was a bit surprised, that my browser (Opera) opened the popups as for now browsers or popup blocker plugins commonly block them. Maybe your script uses some mechanism that works around this blocking.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 25.2019 — I called them popups but my terminology is incorrect. What I called popups are merely standard web links that open in a new window over top of the calling page. I've done this so that the user doesn't lose their place in the site.

If you don't use Rapid PHP, how do you open your PHP web pages on the local computer before you upload it? (i.e. for debugging)
Copy linkTweet thisAlerts:
@SempervivumOct 25.2019 — PHP needs a webserver to run where it is installed. (A webserver in this context is not a computer but a piece of software which reads all the files, parses PHP if necessary, and sends them to the browser). Commonly developers install a local webserver. There are several packages available including the server, PHP and a database: XAMPP, WAMP and more. Such packages include an installer so that they are easy to install.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 25.2019 — I'm having trouble....

-I installed XAMPP according to the instructions at: https://blog.udemy.com/xampp-tutorial/

-After installing, I followed the "testing your XAMPP Installation" and opened the splash screen as partially shown below:

[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-10-25/1572031342-797777-xampp1.jpeg]

-I then followed step 5 to test the installation but got the following error message:

_Parse error: syntax error, unexpected 'world’' (T_STRING), expecting ',' or ';' in C:xampphtdocstest.php on line 3_

-I also attempted to load one of the PHP pages that I am working on and got the same result.

I must be doing something wrong. Any suggestions?

:
Copy linkTweet thisAlerts:
@SempervivumOct 25.2019 — Try this short PHP code:
<?php
phpinfo();
?>
Copy linkTweet thisAlerts:
@viseOct 25.2019 — i have a problem like this ... thanks for expand it

Links removed by Site Staff so it doesn't look like you're spamming us. Please don't post them again.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 25.2019 — Sorry about the link. I just wanted to help describe what I was doing. I won't do it again.

I tried your short code and it works. I got a detailed description of PHP Version 7.3.10.

Here is my test code that didn't work:

<?php

echo ‘Hello world’;

?>


It looks the same to me.

Copy linkTweet thisAlerts:
@SempervivumOct 25.2019 — I see, the apostrophs around `hello world` are wrong. Did you use some text processing software to create the code?
Copy linkTweet thisAlerts:
@dsscottageauthorOct 25.2019 — I changed the file to:

<?php

echo Hello world;

?>

I still get the same error.
Copy linkTweet thisAlerts:
@SempervivumOct 25.2019 — Sorry, I wasn't precise enough: The apostrophes are needed to enclose the string "Hello world". However there are four types: ' ´ ` "

The first one and the last one are correct when coding PHP. Maybe a text processing software will create additional types.
Copy linkTweet thisAlerts:
@dsscottageauthorOct 26.2019 — Thank you. Changing the quotations fixed the issue. It's strange, I built the original test file using a cut and paste from the installation/usage instructions that I found on the internet. Oh well, at least I now know that xampp is installed and working correctly.

One last question (hopefully)....

In order to convert my original HTML web pages, I simply changed the file extension from HTML to PHP and replaced the javascript menu code with the PHP "include" function (with the CSS menu in a separate file). I've uploaded a few of these pages to my server and they appear to work without any error messages. I have left all the HTML metadata in place. Is that acceptable or do I need to delve further into PHP coding to get it correct?

Thank you again for all the help!
Copy linkTweet thisAlerts:
@SempervivumOct 26.2019 — I have left all the HTML metadata in place. Is that acceptable or do I need to delve further into PHP coding to get it correct?[/quote]PHP include is a fairly simple thing and you need not dive into PHP for using it. I does the same as if you copied the code from the file being included and pasted it at the same location where the include instruction is located.
Copy linkTweet thisAlerts:
@rootOct 27.2019 — It all depends on where you are TRYING to run it from, if it is not in a server htdocs or http folder that the server serves from, it won't work.
Copy linkTweet thisAlerts:
@dsscottageauthorNov 10.2019 — In case anyone else finds this post and has a similar problem, briefly here is my solution.
  • 1. I installed both XAMPP & WAMP but wasn't satisfied with the usability. i.e. It was necessary to locally store my web site within one of their programs directories along with some of their files. That didn't work well with my work flow.

  • 2. I had Rapid PHP installed and once I got used to it, it worked perfectly. There is a window for programming and another to preview the results. Very convenient.

  • 3. With respect to AllWebMenus, it is outdated and dormant. I don't know why but some Chrome update created a conflict and the menu no longer worked.

  • 4. I rebuilt my menus using "Easy CSS Menu" and linked them to my web pages using the PHP function "include".

  • 5. Once the site was converted to PHP and the CSS menus were installed and working, some of the other functions in the web site that required javascript didn't work. Ultimately, I found that one of the javascript files (jquery.fancybox-1.3.4.css - which was located and accessed locally) was either corrupt or outdated. It was necessary to link to that file over the web with a secure link (HTTPS). It's odd that my old menus worked with the original javascript file. It seems that whatever process renders PHP files is a little more critical than HTML rendering.


  • Now everything is working correctly.

    Thank you to everyone who posted and offered assistance.
    ×

    Success!

    Help @dsscottage spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.1,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...