₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,286 members, 8,449,570 topics. Date: Wednesday, 22 July 2026 at 02:57 AM

Toggle theme

Javascript - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersJavascript (542 Views)

1 Reply

Javascript by cassyemmanuels(op): 1:08am On Nov 27, 2018
Hello guys I need assist on something in javascript, my code is working only in index page and not in all other pages..
Re: Javascript by Nobody: 2:24am On Nov 27, 2018
cassyemmanuels:
Hello guys I need assist on something in javascript, my code is working only in index page and not in all other pages..
be sure to include the JavaScript file in the other pages too
Re: Javascript by cassyemmanuels(op): 7:56am On Nov 27, 2018
Bro thank you so much for the reply, but the issue at hand is take for instance a php website with multiple pages, were the header and footer is in different files using php include statement to include the header and footer i. e <?php include "header" ; ?>
And an external javascript file linked in the header or footer. I. e for instance <javascript src="mm.Js">
And a button located in the header page, since the header is included in all pages, that makes the one button appear in all pages, the button is to trigger a javascript function inside the linked javascript file for instance a function to alert "hello world ", now when the button is clicked on the index page it triggers the function but when the same button is clicked in the other pages the function Will not be triggered...
1 Reply

Please I Need Help With This Javascript Issue#get Responsive Website Developed Fast In Short Time. #php, #javascript....Build A Github Repository Finder App 2019 Using Javascript (FOR BEGINNERS)234

How Cyber Criminals Are Conning YouIHow To Send 100k+ Emails Daily INBOX Video Tutorial 1 GB+