fatkatie Posted July 25, 2017 Share Posted July 25, 2017 I have 'launched' an iframe from index.php. Index.php defines: <title>Admin Panels</title>. Within this iframe I access other pages with onClick. The function called looks like: function adminPanelRedirect(gotoHere) { switch (gotoHere) { .... document.location.href='http://news/administration/adminpanel3.php'; How can I change the title to 'Panel 3'. I've tried various DOM paths with window. and document. but I can't seem to get it done. window.frameElement.title returns the current one, but I can't change it. I don't want to use jQuery. Thanks. Link to comment Share on other sites More sharing options...
requinix Posted July 25, 2017 Share Posted July 25, 2017 Try window.top.document.titleBut are you sure you should be using iframes? If the parent and the frame have to talk to each other that way then it sounds like you shouldn't be using iframes. Link to comment Share on other sites More sharing options...
fatkatie Posted July 25, 2017 Author Share Posted July 25, 2017 I should have done my iframe 101 before posting. I'll get back. The point to all this is to hide all the admin pages URLs. It works very well except for the titling/branding. I wound up using js because the anchors exposed addresses defined in href. Link to comment Share on other sites More sharing options...
requinix Posted July 25, 2017 Share Posted July 25, 2017 You know this doesn't actually hide the URLs though, right? I mean, any user can find out really easily what they are. And any links in the frame will be visible to the user too. Link to comment Share on other sites More sharing options...
fatkatie Posted July 25, 2017 Author Share Posted July 25, 2017 So I just discovered. btw - window.parent.document.title = 'some title'; this hiding business looks like a full blown ajax exercise. Damn. Thanks again. -- update. I'll just use the server. Forget hiding anything. I read it isn't worth it.. and I believe it. Link to comment Share on other sites More sharing options...
requinix Posted July 25, 2017 Share Posted July 25, 2017 this hiding business looks like a full blown ajax exercise. Damn.AJAX makes it a little harder but still won't hide the URL. Spoiler: there's nothing you can do to win this. All you can do is try to make it harder, but really you're just wasting time that could be better spent on other tasks. Link to comment Share on other sites More sharing options...
fatkatie Posted July 26, 2017 Author Share Posted July 26, 2017 Yah know.... I should be asking things like... "What do think about doing this?". I think there is a design forum in here. Security thru obfuscation? What was I thinking? You are correct.. It was abandoned. Aside. I would have thought, however, an ajax solution would work. It would expose the server side support file and the hosting page; but that's it. Correct? Link to comment Share on other sites More sharing options...
requinix Posted July 27, 2017 Share Posted July 27, 2017 It would expose the server side support file and the hosting page; but that's it. Correct?It exposes everything that is part of the request and the response. That's the full URL for the request (domain name, path, query string), any POSTed data sent with the request, and whatever data is returned in the response. Which is what happens with regular requests and responses anyways. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.