Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Microsoft loses browser court case

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

JavaScript Code Problem
Reply
 
Thread Tools
Old 01-09-2003, 16:13   #1
Tricky
Inactive
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+HD - BT Infinity
Posts: 2,284
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Java Problem

Help, I'm writing a photoalbum in JAVA and need some help...

I want to change the title of the browser window (the remote one) to something more meaningful (like my webspace name)

The code which creates a new window with the image in is:
imgName="photos/st_"+aImage[iImagenum]
imgWindow=window.open(imgName,"imgWin","Width=660, height=510,scrollbars=no,status=yes")
imgWindow.window.status=aText[iImagenum]

I can change the "Status Bar" of the window as in the 3rd line of code above, but I want to change/set the title (Ie. nthellworld.co.uk at the top left of your browser).

Any ideas?
Tricky is offline   Reply With Quote
Advertisement
Old 01-09-2003, 16:59   #2
Tricky
Inactive
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+HD - BT Infinity
Posts: 2,284
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Best I could manage but it works!

imgName="photos/st_"+aImage[iImagenum]
imgWindow=window.open('','imgWin','height=510,widt h=660,scrollbars=no,status=yes');
imgWindow.document.write('<HTML><HEAD><TITLE>Your Selected Image: '+aImage[iImagenum]+'</TITLE>');
imgWindow.document.write('<LINK REL="stylesheet" HREF="../../../rtstyle_zeddy.css">');
imgWindow.document.write('</HEAD>');
imgWindow.document.write('<BODY>');
imgWindow.document.write("<IMG SRC="+imgName+" </IMG>");
imgWindow.document.write('</BODY></HTML>');
imgWindow.window.status=aText[iImagenum]
Tricky is offline   Reply With Quote
Old 01-09-2003, 17:08   #3
philip.j.fry
Inactive
 
philip.j.fry's Avatar
 
Join Date: Jul 2003
Posts: 1,395
philip.j.fry has reached the bronze age
philip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze age
Quote:
Originally posted by Tricky
Help, I'm writing a photoalbum in JAVA and need some help...

Don't you mean Javascript
philip.j.fry is offline   Reply With Quote
Old 01-09-2003, 19:48   #4
Alan Waddington
Inactive
 
Alan Waddington's Avatar
 
Join Date: Jun 2003
Location: Farnham
Posts: 503
Alan Waddington has a spectacular aura about themAlan Waddington has a spectacular aura about themAlan Waddington has a spectacular aura about themAlan Waddington has a spectacular aura about them
Code:
<html>
<head><title>Extreme PhotoAlbum</title></head>
<body>
<script language="javascript">
imgWindow=window.open("image0013.jpg","imgWin","Width=660,height=510,scrollbars=no,status

=yes");
imgWindow.document.title="Really interesting picture";
</script>
</body>
</html>
/edit works in IE6, doesn't in Mozilla 1.4 or Nescape 4

Guess it depends whether that's important
Alan Waddington is offline   Reply With Quote
Old 01-09-2003, 21:14   #5
Tricky
Inactive
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+HD - BT Infinity
Posts: 2,284
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Cheers mate, I was certain that I'd tried the obvious but alas I can't have done - I've stuck with my dodgy code because I've duplicated it in a number of html pages now!!!

Thanks again...
Tricky is offline   Reply With Quote
Old 01-09-2003, 22:27   #6
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
could you not just use document.title ?

edit: should maybe read whole thread before replying
Bifta is offline   Reply With Quote
Old 07-09-2003, 09:11   #7
MadGamer
Inactive
 
MadGamer's Avatar
 
Join Date: Jun 2003
Location: Essex
Age: 38
Services: Sky multiroom (Sky Q) Sky Fibre Unlimited Sky Landline
Posts: 8,851
MadGamer has a nice shiny star
MadGamer has a nice shiny starMadGamer has a nice shiny star
Maybe you should select everthing before you start to copy over to another location
MadGamer is offline   Reply With Quote
Old 07-09-2003, 10:18   #8
Tricky
Inactive
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+HD - BT Infinity
Posts: 2,284
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Quote:
Originally posted by WNA
Maybe you should select everthing before you start to copy over to another location
And translated means?
Tricky is offline   Reply With Quote
Old 07-09-2003, 11:59   #9
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
You shouldn't be using IE only JS, try learning the proper way with the DOM:
http://www.w3.org/DOM/
Richard M is offline   Reply With Quote
Old 07-09-2003, 13:26   #10
MadGamer
Inactive
 
MadGamer's Avatar
 
Join Date: Jun 2003
Location: Essex
Age: 38
Services: Sky multiroom (Sky Q) Sky Fibre Unlimited Sky Landline
Posts: 8,851
MadGamer has a nice shiny star
MadGamer has a nice shiny starMadGamer has a nice shiny star
Umm err no notepad to be precise
MadGamer is offline   Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:58.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum