Jump to content

iframe; change title of page within


fatkatie

Recommended Posts

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

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

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.