Stats: 3,191,870 members, 7,945,770 topics. Date: Wednesday, 11 September 2024 at 06:18 AM |
Nairaland Forum / Science/Technology / Webmasters / Javascript (435 Views)
#get Responsive Website Developed Fast In Short Time. #php, #javascript.... / Creating A Simple Calculator Using HTML,CSS And Javascript / <html> Or Javascript (2) (3) (4)
(1) (Reply)
Javascript by cassyemmanuels: 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:be sure to include the JavaScript file in the other pages too |
Re: Javascript by cassyemmanuels: 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)
I Will Create A Blog For You At A Cheaper Price / Shop Zara, Fashionnova, Asos & Lasenza And Others From Nigeria 2020 / Hire Blogpost Writer
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6 |