so the story is that i using and IFRAME in my web site , and i want the main title of the document (which appears in the browser title bar) to be the title from the iframe 'page' . my English is not so good so i 'll give an example .
I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window? I remember I had before a problem because I wanted to bring back iframe and not top window as it did. But today I tested my Facebook app and was surprised to see it works as I need which means it brings back/forward iframe window and not top. Is it possible that Facebook has some javascript code which does that or is this normall behaviour?
I want to be able to get title of a document that is presented within an Iframe with the id "popupFrame". There may be more than 1 instance of the iframe in the page.
var elementCount = document.all("popupFrame").length; for (var i = 0 ; i < elementCount ; i++) { alert("src = " + document.all("popupFrame",i).src); alert("title = " + document.all("popupFrame",i).document.title); }
But the wierd thing is that the title is always the title of the document that contains the Iframe. NOT the title of the document conatined within the Iframe. At least in IE7 which is all that I have tested it with so far.
provide me with code to make a collapsible menu? What I'm looking for is a vertical menu, that will open up the sub-categories upon a mouseover. Clicking on the menu item will bring them to the specific page. Oh, and this might not matter, but I'd prefer if I was able to style the menu to fit with my site theme.
How do I use Javasript to get the <TITLE> element of a web page? If anyone can supply a cross browser way (IE 5.5+, Firefox 1+), it is most appreciated.
I want to display the title of my pages (the title which appears on the top of your browser window) in the actual page aswell. How do i do this, i need javascript or some kidn fo script to look at the title and then write it to the page.
I found this code in another thread... basically, I need to be able to display a certain image based on the page's title... for instance if the title is: Lotus 7, I need image lotus.jpg to display in an element on the page, however, if the title is Bodhi 9, I need image bodhi.jpg to display in the same element
var imgs = new Array(); imgs[0] = new Array(); imgs[0][0] = "Research";
One my website its one index page, putting in content depending on the link (ie ?page=xxxxx) and from that it generats the page name, (Page name - MySite). I also have an AJAX search form working on keyup (kinda like google autosearch). I want it so when i start typing there it changes the title to Search - MySite. Then when its empty revert to what ever it was before. I already have the AJAX coding for the search bar.
Also i need to check if its on the homepage or not, and if not load the homepage (currently done by php include), does javascript have an equivelant of php's include?
I have been trying to find a simple way to capture the page title for a form that will be used throughout my site.Basically, creating a javascript function to allow a user to email a page to a colleague. Of course I only want to have one form, so I wanted to capture the referrering page information.I have had no trouble capturing the referring URL using javascript, associating it with a form field and passing it through PHP validation and emailing it.I am having trouble doing the same for the title. I have tried to capture these with an onLoad event, but that didn't work (for title only - works for others).
Here's the js which is referenced on the html pages (link to external file):
// JavaScript Document function start() { var ref = document.getElementById('httpref');
as with document.title we can get the current page title,
<body onLoad="MM_goToURL('parent','script.php?title=document.title');return document.MM_returnValue"> this is the function I've used for that above trick
function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); }
This page: [URL] seems to indicate that it's possible, but it looks like it also pops up an alert window which would be annoying as hell. Is there a way to, say, once every minute change the title bar text?
You see I have a text file of rotating slogans that appear each time you reload a page on my site and someone suggested that having them change even when the page is already open might be fun. I thought I'd look into it and see if it's possible. The site is [URL]
I don't know enough about javascript to know if this is possible. I am fairly good at implementing and installing other people's code, though, and can usually make minor changes to tweak things.
I have a URL (var spUrl) and I am trying to get the <title> of the page at that location. I am using $.ajax() to pull the page and process the <title> tag from the response $(data). For some reason, Opera is able pull the title from the <title> tag, but no other browsers are able to do so. When I modify the code to pull the <h2> tag instead of the <title> tag, it works in all browsers.
I'm trying to read the <title> value from a page head. All browsers I've tried are happy with $ 'title'.text apart from ie8 which returns nothing. Am I doing something wrong, or is it IE8 that's wrong? Is there a workaround?
I've never been here before and probably shouldn't be let loose with this level of codey stuff but here goes. On my site at [URL].. I'm having problems with getting the Page title to show: It sort of flashes up but is quickly replaced by the browser name. I've discovered that if I remove the few lines containing the NoConflict commands (below) <script type='text/javascript'> var $jq = jQuery.noConflict(); </script> ...then the Page Title is fine. But: Of course I lose my second JQuery effect (in this case it's the tooltip). Frustrating. This seems to be a conflict with the NoConflict... right?
Hi I'm new to the development world and have bumped into a tough problem for myself. I'm attempting to display external RSS feeds on my site using AJAX. The 'title' and 'link' tags from the XML file appear on my page without any problem. However, unlike the 'title' and 'link' tags, some of the 'description' tags contain HTML.[URl].. This seems to be an issue when I'm trying to display the content within the description tags.
Code: function getXMLHTTPRequest() { try { req = new XMLHttpRequest(); /* e.g. Firefox */ } catch(e) {
[Code]...
As you can see, I embarrassingly tried enclosing the variable newtext2 in CDATA tags to no avail. Since I do not directly have access to this RSS file (other than asking my friend if I can edit it), is there a way for me to display the HTML content within the 'description' tags strictly via JavaScript?
I'm designing a website and I would like to add a certain class to a navigation element based on the document title. I currently have the following javascript. The nav elements have separate ids (the About Us nav element has the id="about" and so on)
<code> window.onload=function(){ var docTitle = document.title; var about = document.getElementById("about"); var advising = document.getElementById("advising")
[Code]...
The problem seems to be that the if statement is true whether or not the document.title ="about" or anything else, (if I remove the return, both about us and advising elements have their class changed.
I use this code to produce a date... however, I need to produce a different date depending on the page title... for instance: Page title: Product 1 will display 5/29/11. Page Title: Product 2 will display 6/13/11 etc.Here is the code I use to produce the date... any tips on how to get a different date for the different pages?
If there a way to have all title attributes become qtips? Right now I'm just going through and finding all the tags that need to be done but this is slow and not reliable.