| Coding Forum Problems with your code? Let's hear about it. |
03-01-2006, 01:23 AM
|
#1 (permalink)
|
|
Contributing Member
Join Date: 08-18-05
Posts: 76
Latest Blog: None
|
Title Javascript popup window
How do you force a basic javascript popup window, title to become what you want it to, without your URL in it and just the title of the page you linked to? This only seems to do it in Mozilla Firefox.
Last edited by thumbtak : 03-01-2006 at 01:41 AM.
|
|
|
03-01-2006, 04:04 AM
|
#2 (permalink)
|
|
v7n Mentor
Join Date: 05-06-04
Location: London, UK
Posts: 1,452
Latest Blog: None
|
I'm not too sure because I always have this problem as well, I will be interested to see the result.
|
|
|
03-01-2006, 08:20 AM
|
#3 (permalink)
|
|
Inactive
Join Date: 10-13-03
Location: wonderfull Copenhagen, DK
Posts: 1,256
Latest Blog: None
|
|
|
|
03-01-2006, 09:04 AM
|
#4 (permalink)
|
|
Contributing Member
Join Date: 08-18-05
Posts: 76
Latest Blog: None
|
I am still lost on how to do this. So below is my code(well slightly altered) and if any one can tell me where to put the title that would be great. Thanks for all the help so far.
Code:
<script>
function clickme() {
NewWin=window.open('http://blabla.com','clickme','toolbar=no,scrollBars=auto,resizable=no,status
=no,width=500,height=500'); }
</script>
<A href="javascript:clickme()" onmouseover="window.status ='' ;return true"
style="text-decoration:none">Click Me</A>
|
|
|
03-01-2006, 09:49 AM
|
#5 (permalink)
|
|
Contributing Member
Join Date: 02-17-06
Location: Sacramento, California
Posts: 226
|
I dont think thats possible.
If you get a solution, do post here 
|
|
|
03-01-2006, 10:17 AM
|
#6 (permalink)
|
|
Possible Terrorist
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
|
Could make it popup an html page, like this
Code:
function popitup2()
{
newwindow2=window.open('','name','height=200,width=150');
var tmp = newwindow2.document;
tmp.write('<html><head><title>popup</title>');
tmp.write('<link rel="stylesheet" href="js.css">');
tmp.write('</head><body><p>this is once again a popup.</p>');
tmp.write('<p><a href="javascript:alert(self.location.href)">view location</a>.</p>');
tmp.write('<p><a href="javascript:self.close()">close</a> the popup.</p>');
tmp.write('</body></html>');
tmp.close();
}
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
|
|
|
03-01-2006, 10:26 AM
|
#7 (permalink)
|
|
Contributing Member
Join Date: 02-17-06
Location: Sacramento, California
Posts: 226
|
even i found tht solution over the net, but i guess that is not what thumbtek needs, try opening a site in the popup using your code, and see for yourself.
or maybe that is exactly what thumb needs 
|
|
|
03-01-2006, 10:31 AM
|
#8 (permalink)
|
|
Possible Terrorist
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
|
I am currently at school, but it looks like it should do the trick..
It will let him change the title of the popup.. which is what he wants
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
|
|
|
03-01-2006, 10:52 AM
|
#9 (permalink)
|
|
Contributing Member
Join Date: 08-18-05
Posts: 76
Latest Blog: None
|
I tried what "m3lt" said and I couldn't get that to do anyting. I even added <script></script> around it and still nothing.
|
|
|
03-01-2006, 11:25 AM
|
#10 (permalink)
|
|
Contributing Member
Join Date: 02-17-06
Location: Sacramento, California
Posts: 226
|
i was reading about this on the net, and found about frameless popups, but it seems even that aint working now, atleast not in Mozilla/IE6 with Win XP SP2.
would be interesting to know if there is a way around this
thumb: btw, why is the popup title is so important to you?
|
|
|
03-01-2006, 12:35 PM
|
#11 (permalink)
|
|
Contributing Member
Join Date: 08-18-05
Posts: 76
Latest Blog: None
|
Quote:
|
Originally Posted by pairbrother
thumb: btw, why is the popup title is so important to you?
|
Its so important cause the address that shows up in the title of the popup window is not the redirection(aka domain) link to my site. Meaning something that I don't want to be knowen.
|
|
|
03-01-2006, 12:45 PM
|
#12 (permalink)
|
|
Contributing Member
Join Date: 01-22-06
Location: Exeter, East Devon, England, UK
Posts: 768
Latest Blog: None
|
Quote:
|
Originally Posted by thumbtak
Its so important cause the address that shows up in the title of the popup window is not the redirection(aka domain) link to my site. Meaning something that I don't want to be knowen.
|
I think that is the point. You can no longer fool people into thinking they are somewhere where they arent.
If your site is within a window from another site try some javascript code to pop out of framesets.
If, as I suspect, you are trying to send users somewhere fooling them into thinking they are on your site. Then try creating an html page on your site with an Iframe to where you want to go. Launch the iframe page within the popup window and the title will say what you like.
Hope this helps.
|
|
|
03-01-2006, 01:52 PM
|
#13 (permalink)
|
|
v7n Mentor
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
Latest Blog: None
|
If menubar is disabled on a child window the URL will display on the titlebar. If menubar is enabled then the URL will NOT be displayed on the title bar.
|
|
|
03-01-2006, 02:25 PM
|
#14 (permalink)
|
|
Contributing Member
Join Date: 08-18-05
Posts: 76
Latest Blog: None
|
Its hosted on my own webserver its just that I have a redirection domain setup to point to my server. So instead of http://www.blabla.com/bla its something like http://www.bla.com of course not a dot com cause its free. But I think you get what I mean.
LoL there acually is a www.bla.com
|
|
|
03-01-2006, 02:31 PM
|
#15 (permalink)
|
|
v7n Mentor
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
Latest Blog: None
|
Here is some code when menubar is ENABLED.
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=0,location=1,statusbar=1,menubar=1,resizable=0,width=400,height=300');");
}
// End -->
</script>
<A HREF="javascript:popUp('http://www.imaginecreativeservices.com')">Open the Popup Window</A>
Same code but menubar is DISABLED.
Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=300');");
}
// End -->
</script>
<A HREF="javascript:popUp('http://www.imaginecreativeservices.com')">Open the Popup Window</A>
|
|
|
10-28-2006, 08:53 PM
|
#16 (permalink)
|
|
Inactive
Join Date: 10-28-06
Posts: 1
Latest Blog: None
|
I found this article via google because I was searching for it.
I tried using menubar=1 but nothing. Then I actually used my braing for a little:
If they want you to know where you are, they show location. If you want to avoid the title url, you want to use location. So, I came up with the brain buster thought of location=1 in your popup settings. Yes, it works. Looks a bit ugly with the location but its worth it imo. The minimized window shows better on someone's start bar without a domain than with a domain.
|
|
|
03-09-2007, 05:44 AM
|
#17 (permalink)
|
|
Inactive
Join Date: 03-09-07
Posts: 1
Latest Blog: None
|
Hello,
If you are calling a web page, then you will not be able to set the Title in the popup window. But if you are trying to open an image in the popup window, then you can set the title.
Please see the code below for both the situations:
a) When calling a web page
<html>
<script>
function clickme() {
NewWin=window.open(http://www.v7n.com','clickme','toolbar=no,scrollBars=auto ,resizable=no,status=no,width=500,height=500');
NewWin.document.title='hello yahoo';
}
</script>
<A href="javascript:clickme()" onmouseover="window.status ='' ;return true"
style="text-decoration:none">Click Me</A>
</html>
b) When calling an image
<html>
<script>
function clickme() {
NewWin=window.open('<some image.jpg>','clickme','toolbar=no,scrollBars=auto, resizable=no,status=no,width=500,height=500');
NewWin.document.title='hello image';
}
</script>
<A href="javascript:clickme()" onmouseover="window.status ='' ;return true"
style="text-decoration:none">Click Me</A>
</html>
Hope this works!
Cheers
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:55 PM.
© Copyright 2008 V7 Inc
|