Web Analytics Made Easy -
StatCounter Hide elements on another HTML page after clicking a button - CodingForum

Announcement

Collapse
No announcement yet.

Hide elements on another HTML page after clicking a button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide elements on another HTML page after clicking a button

    Hi, this is my first post on the forum.

    I was just wondering whether there is a way to hide an element on another page after clicking on a button?

    Basically, I have a login page, and for testing purposes, I want it so when you click a button, it runs some javascript in a file called ajax.util.js, and I have a jQuery file attached to the HTML file as well (http://ajax.googleapis.com/ajax/libs.../jquery.min.js), and I am using Google App Engine, which im not sure whether thats relevant. I tried using the show and hide functions provided by the jQuery file, but no luck, i want to hide an element which is a link with ID admintools. I have also tried getting the element by ID and changing the display style to none and hidden but still no luck. Im not sure whether its only possible to hide elements in the login.html page.

    What I want it to do basically is click on the submit button in the login page, it will then run a javascript function which redirects you to index.html (which i am doing using window.location), and then hides an element in the index.html page (id=admintools).

    Any help would be great, Thanks in advance

  • #2
    If the HTML sources for the two windows are from the same domain, yes. Otherwise, no.

    If one of the pages is a POPUP created by the other one, or an <iframe> within the other one, it's especially easy. Otherwise, it might take some work to get a reference to the other page.

    Would be easiest to give better answer if you could show us the situation live (give us a URL to look at).
    Be yourself. No one else is as qualified.

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎