Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-05-2002, 03:55 PM   #1
jaredly
Registered User
 
Join Date: May 2002
Location: Des Moines, IA
Posts: 158
Send a message via AIM to jaredly
Default code not working

The problem I am haveing with this code is the title of my web browser does not change to its given name.

clickclick here, then go to the articles link to see my problem

The code for this tutorial is divided into 2 parts HTML code and FLASH code

Part 1 -- FLASH code

In actions choose the GET URL function and paste in following code:

javascriptpenNewWindow('somePage.html','thewin',
'height=100,width=250,toolbar=no,scrollbars=yes');

Where somePage.html is the filename or URL of the page or site you wish to pop up.
Note: The above code is spread over two lines for tutorial neatness only. In Flash it need be on only one line.

Part 2 ---HTML code

Paste this code exactly as it appears below, between the HEAD tags in the HTML source.

<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>

Add the following parameter inside the <EMBED> tag in your HTML page which houses the SWF file:

swLiveConnect=true NAME=yourmovie.swf

Replace "yourmovie" with the name of flash movie. You can put it anywhere inside the <EMBED> tag, but perhaps the best place would be after the WIDTH and HEIGHT parameters
Note: This is important as it allows the Flash movie to communicate with the JavaScript code.
jaredly is offline   Reply With Quote
Old 06-05-2002, 04:21 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

your second popup - the frame set with the list of articles has this code:
PHP Code:
<html>
<
head>
<
title>Untitled Document</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<
link rel="stylesheet" href="css_normal.css" type="text/css">
</
head>

<
body bgcolor="#4d0000" text="#000000" class="gold_big">
<
div align="center"><img src="article.gif" width="288" height="59"> </div>
</
body>
</
html
but you want the <title></title> tag to change to which ever article is chosen by the user to load into the frame? is that right?

if it is, i think you may be hurtin. the 'title' is a read only property of the document object. so once it is written, you cant go and change it on the fly, without re-writing the whole page.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 06-05-2002, 06:49 PM   #3
jaredly
Registered User
 
Join Date: May 2002
Location: Des Moines, IA
Posts: 158
Send a message via AIM to jaredly
Default No

I am not trying to change the title on the fly. I am just trying to have it titled when it pops up.

I have a button with this action script in my movie.

on (release) {
getURL("javascriptpenNewWindow('article_frameset .html','articles','height=390,width=400,toolbar=no ,scrollbars=no');");
}

I want the title to read articles, not untitled document.

I also have pasted this code exactly as it appears below, between the HEAD tags in the HTML source.

<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>

and the following parameter inside the <EMBED> tag in my HTML page which houses the SWF file:

swLiveConnect=true NAME=mmm_main.swf>
jaredly is offline   Reply With Quote
Old 06-05-2002, 07:15 PM   #4
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

open up the file 'article_frameset.html' its the file with the frameset in it, and find the <title></title>tags and just type in a title('articles'). that should do it. the title of the document should have nothing to do with what you have in your javascript or flash file.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 06-05-2002, 07:25 PM   #5
jaredly
Registered User
 
Join Date: May 2002
Location: Des Moines, IA
Posts: 158
Send a message via AIM to jaredly
Default code

This is the code on the article_frameset.html page

<html>
<head>
<title>articles</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css_normal.css" type="text/css">
</head>

<body bgcolor="#4d0000" text="#000000" class="gold_big">
<div align="center"><img src="article.gif" width="288" height="59"> </div>
</body>
</html>

and it still is not working
jaredly is offline   Reply With Quote
Old 06-05-2002, 07:42 PM   #6
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

jared... sorry bud, i feel like i'm given you a hard time, don't mean to. i think you got it, but...
i totally hosed you with the html code i posted earlier.

the page that loads the articles might look something like this (not to sure, cant see source for framesets from client):
<html>
<head><title></title></head>
<frameset>
<frame></frame> (this might be called article_head)
<frame></frame> (this might be called article_listing)
<frame></frame> (this might be called article)
</frameset>
</html>

the html i posted earlier, and that you put the title into is the page that holds the article img only (it goes across the top of the page in the first frame.

see if you can find the page that has the <frameset>tag and change the <title> of that document.

sorry for the confusion... hope i haven't just made it worse.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 06-05-2002, 07:56 PM   #7
jaredly
Registered User
 
Join Date: May 2002
Location: Des Moines, IA
Posts: 158
Send a message via AIM to jaredly
Default Ok

I think all the html is corect. article_frameset.html is the container of all 3 frames. The problem I think is with the java or the action scripting. I think I will look around for some new code. Thanks for your help. what do you think of the site as a hole.
jaredly is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window resizing code not working. Whats missing PhishIn4Dmb ActionScript 2.0 1 11-02-2004 07:09 AM
external clip loading code not working agent Smith ActionScript 1.0 (and below) 2 10-18-2004 03:58 PM
Database simulated with arrays on a cd-rom lecasn5 Components 61 09-07-2004 11:40 AM
Why isnt this code working? Nanonus ActionScript 2.0 3 11-17-2003 07:08 AM
button code not working please see file BadBadNeil ActionScript 1.0 (and below) 0 02-19-2003 02:50 PM


All times are GMT. The time now is 09:05 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.