SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,625
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Need JS to disable/override document.getElementById("id").innerHTML = "yada";

    I have document.getElementById("loading").innerHTML = "Loading..."; in my combined.js on each page. However the one line prevents my gallery.js from working. And I just so hapen to not need it on this page. Is there any way to disable, or override, mask, no conflict, anything, that one liner for this single page in question? Thanks!

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,604
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    What other code do you have in the page? Without seeing that there is nothing to go on to tell you what to modify.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You can add some class to body tag and then call your function depending on that, for example. Or use window.location.pathname to check that specific page is loaded.

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,625
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    What other code do you have in the page? Without seeing that there is nothing to go on to tell you what to modify.
    I guess I started a new thread to soon. Looks like I got my answer here http://www.sitepoint.com/forums/show...-version-1-4-4


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •