Computer Talk Discussions here pertain to mods, troubleshooting, and PC/console gaming

javascript help

Thread Tools
 
Search this Thread
 
Old May 15, 2006 | 07:18 AM
  #1  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
javascript help

anyone here know javascript well?

I need help with a minor problem. I have a script that is set to open a window with no address bar. however, in the window's titlebar it states the URL first then the Title code.

I cannot seem to find or remember how to code it such that it does not
do this. Does anyone know why it is happening or what I can add to the
script to change it?


heres the code im using:

Code:
<script language="javascript" type="text/javascript">
<!--
function MyOpenWindow() {
  var MyURL = 'http://www.url.com/popup';
  var MyWindowName = 'popup';
  var MyWindowOptions = 'width=800,height=640,toolbar=yes,scrollbars=yes,address=yes,location=no,titlebar=no,fullscreen=yes';
  window.open(MyURL, MyWindowName, MyWindowOptions);
}


// -->
</script>


thanks guys.
Reply
Old May 15, 2006 | 07:31 AM
  #2  
calrockx's Avatar
Contributing Member
 
Joined: Sep 2002
Posts: 4,749
Likes: 0
From: Santa Clarita, California
there's probably a javascript solution tho this, but it might be tough to find. at least i didn't find one in a quick search.

if you don't have control over the page being opened, you could create a new webpage, set that other site to open within an iframe and then assign a title to the webpage you created.
Reply
Old May 15, 2006 | 07:38 AM
  #3  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
i thought of that but i do in fact have control over the page being opened.

what it does is the following:

URL - TITLE - Microsoft Internet Explorer

Reply
Old May 16, 2006 | 05:12 AM
  #4  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
noone?
Reply
Old May 16, 2006 | 06:44 PM
  #5  
tulsa_97SR5's Avatar
Contributing Member
 
Joined: Feb 2004
Posts: 1,318
Likes: 0
From: tulsa, OK
Man, I meant to pull this up and try it at work today & totally forgot. I bet I can figure it out as I'm doing the same thing on a couple pages at work. Shoot me a pm tomorrow if I don't reply here again.
Reply
Old May 17, 2006 | 06:11 AM
  #6  
tulsa_97SR5's Avatar
Contributing Member
 
Joined: Feb 2004
Posts: 1,318
Likes: 0
From: tulsa, OK
so do you want to blank out the title on the new window?

try changing your window.open line to this

var MyWindow = window.open(MyURL, MyWindowName, MyWindowOptions);

and after that line add
MyWindow.document.title = ''; //if you want a different title you can add it inside the ''

this *should* work, but I think it may require a delay in between opening the window and setting the title. When I step through it in debug mode it works, as long as the popup has finished loading. If I run it real time it throws an error.

edit I played around with it a bit more, got it to work with a 1 second delay. Threw up a temp page here see if it works & check out the source.

Last edited by tulsa_97SR5; May 17, 2006 at 06:31 AM.
Reply
Old May 17, 2006 | 06:34 AM
  #7  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
im still getting the URL then it changes the extension to "hey there lee"

thanks Tulsa for trying... I am trying everything under the sun right now and none of it works or makes sense!
Reply
Old May 17, 2006 | 06:39 AM
  #8  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
the iframe page works until i need to link out to a page i do not have control over... they must have a script that clears out of frames or something
Reply
Old May 17, 2006 | 07:36 AM
  #9  
tulsa_97SR5's Avatar
Contributing Member
 
Joined: Feb 2004
Posts: 1,318
Likes: 0
From: tulsa, OK
are you trying to make sure the url never shows up at all? Sounds like you are getting into phishing
Reply
Old May 17, 2006 | 09:11 AM
  #10  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
well this is how it works. we're setting up an education one-stop-shop basically.

in doing this, we're trying to cover the education sources as much as possible. we pay the sources to allow us free reign to their content and we monitor access based on a login to a portal on our end, which allows them straight in to the providers content.

now.... since we want to hide the source, it doesnt help if their URL is plastered at the start of the titlebar.

thats all it is...
Reply
Old May 17, 2006 | 09:27 AM
  #11  
OutdoorLiving's Avatar
Registered User
 
Joined: Feb 2006
Posts: 695
Likes: 0
From: N34* 06.000 W084* 27.000
I would have thought that either titlebar=no or location=no would have done the trick. Try executing it directly in the window.open() statement (instead of by variable) to see if it worked?
Reply
Old May 17, 2006 | 09:54 AM
  #12  
tulsa_97SR5's Avatar
Contributing Member
 
Joined: Feb 2004
Posts: 1,318
Likes: 0
From: tulsa, OK
Originally Posted by lee
well this is how it works. we're setting up an education one-stop-shop basically.

in doing this, we're trying to cover the education sources as much as possible. we pay the sources to allow us free reign to their content and we monitor access based on a login to a portal on our end, which allows them straight in to the providers content.

now.... since we want to hide the source, it doesnt help if their URL is plastered at the start of the titlebar.

thats all it is...
I think that browsers are all set up to not allow this for security reasons, I changed my site to open yotatech in a new window, and when i try to change the title i get this error, same link as above if you want to see it.

Error: uncaught exception: Permission denied to set property HTMLDocument.title

I see the need for what you are doing, but don't think it's going to be this simple. I think that if you did get this to work for the initial page load, as soon as they click a link on the 3rd party site they would be on a whole new page that would be completely out of your control. I could see writing code to basically mine the data out of a 3rd party page and then turning that into a page of your own that you could control, but that would be a huge undertaking. If I come up with any simpler ideas I'll let you know... sorry.
Reply
Old May 17, 2006 | 10:31 AM
  #13  
lee's Avatar
lee
Thread Starter
Contributing Member
 
Joined: Dec 2003
Posts: 6,729
Likes: 0
From: boston, ma
or beyond that my hope was to do it on a page i do control and then place the 3rd parties page in an iframe.

aaron, ill try that.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Sizzle Chest
Pre 84 Trucks (Build-Up Section)
19
May 25, 2009 03:09 AM
Bob_98SR5
Maintenance & Repair
0
Jan 14, 2006 09:21 PM
Bob_98SR5
Maintenance & Repair
0
Jan 14, 2006 09:10 PM
Bob_98SR5
Performance Enhancements
3
Dec 26, 2005 09:03 PM




All times are GMT -8. The time now is 03:47 PM.