Click to See Complete Forum and Search --> : Hiding URL from title bar
raktims
01-13-2003, 01:20 PM
Hi,
I an opening a new window from my main window. In the new window I want ot hide the url it is loading. How can I acheive that ? Is there any parameter in the window.open() that can be set to aceive this or there is some other way ?
Thanks,
Raktims
Yes.
window.open ("popup.htm","popup","location=no");
raktims
01-13-2003, 01:36 PM
Thanks for the reply. I tried but it is still showing the URl.
I am calling the function like this:
writeWin = window.open('','aWin','resizable=1,location=no,top=0,left=0,width=350,height=250');
Where I am going wrong ?
Raktims.
Where is it showing it? That should have removed the address bar.
raktims
01-13-2003, 01:43 PM
At the topmost blue bar where the IE logo is displayed.
Ok, that can be changed by specifying a <title> in the page you are opening.
raktims
01-13-2003, 06:03 PM
I still can get it work. Help !!!
The following is my code.
In writeLeft() I have a form. Its action tag is initialized to a URL based on a logic. My problem is when the page is loaded in the window the URL also displayed in the title bar. How can hide the URl there and put my own title ? Also can I call a Javascript function from the ACTION tag ?
I am new to this ..please advise.
Raktims
************************************************
var writeWin = null;
var wd = null;
var writeWin = null;
var fileName = null;
function writeLeft(ind)
{
if (ind == 1)
{
fileName = "http://fcv9401/aCGHLabelingChecklistv1_9.pdf";
//alert ("Ind: " + ind + " " +fileName);
}
if (ind == 2)
{
fileName = 'http://fcv9401/aCGHLabelingChecklistv1_9.pdf';
//alert ("Ind: " + ind + " " +fileName );
}
if (ind == 3)
{
fileName = 'http://fcv9401/chinlab/gif.exe';
//alert ("Ind: " + ind + " " +fileName );
}
//writeWin = window.open('','popup','locationbar=no');
writeWin = window.open('','popup','resizable=1,location=no,top=0,left=0,width=350,height=250');
//writeWin = window.open('','aWin','popup','location=no');
var ePen = "<html><head><title>Login</title></head>";
ePen += "<body text='#cccccc'>";
ePen += "<Form name='logonForm' action="+fileName+" method='GET' onSubmit='return window.opener.ValidateForm(this,document.forms[0].passwd.value,document.forms[0].email.value); parent.document.title="Docs"'>";
ePen += "<p align='left'><font color='#009999'>Email</font> </p>";
ePen += "<INPUT TYPE=text NAME=email VALUE='' MAXLENGTH=60 SIZE=20>";
ePen += "<p align='left'><font color='#009999'>Password</font> </p>";
ePen += "<INPUT TYPE='password' NAME=passwd VALUE='' MAXLENGTH=60 SIZE=20>";
ePen += "<input type='submit' value='Submit' name='Submit'>";
ePen += "<INPUT type='button' value='Cancel' name='Cancel' onClick='window.opener.Closewin()'>";
ePen += "</form></body></html>";
wd = writeWin.document;
wd.open();
wd.write(ePen);
wd.close();
}
function Closewin ()
{
//alert ("Cancel Clicked");
writeWin.close();
}
function ValidateForm(form,pass,email)
{
//alert("In ValidateForm");
if ( (pass == "") || (email == ""))
{
alert("Please fill in all required fields.");
writeWin.focus();
return false;
}
if ((pass == "1234") && (email == "raktim"))
{
alert("Authorized");
//top.opener.location.reload(true);
writeWin.focus();
//writeWin.close();
return true;
}
else
{
alert("Please fill in all required fields.");
writeWin.focus();
return false;
}
}
Post all your code (or at least what you are using to call this). Or, better yet, post a link.
raktims
01-13-2003, 06:19 PM
Find a zip file attached with 2 source file inside.
thanks.
It seems to be working for me. Here is a (resized) screen shot of what I get...What do you get?
raktims
01-13-2003, 06:45 PM
Till this step it is working for me. In the very next step when the username & pwd is validated the popup window opens a page (from the ACTION tag). This is where it shows the URL which I want to hide or overwrite with my title.
Hope I explained it.
Raktims.
Ok, I see the problem now. You are opening a PDF, and that is the address you don't want them to be able to see, right? If so, what I would do is use a chromeless window, as this will remove the title bar altogether. (http://www.dynamicdrive.com/dynamicindex8/chromeless.htm)
raktims
01-13-2003, 07:08 PM
Thanks again. That is exactly what I want. I will explore the chromeless window option. But is it not possible to modify the title of the popup when it displays the pdf with the current code ? I am just curious ?
None that I know of, because you aren't opening a html page, you are opening a pdf document.
raktims
01-14-2003, 02:09 PM
Thanks I finally got it to work with Chromeless windows.
:D