Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

How to disable address toolbar ?

Hi,
I am trying to hide the address toolbar but it seems the sintax is not ok:

<a href="window.open("myfile.xls", "Window", "toolbar=no,menubar=no,width=800,height=500,resizable=yes,status=no,top=50,left=100,scrollbars=yes");" target="_new"> Spreadsheet Book</a>

Thanks in advance,
0
Mylor
Asked:
Mylor
  • 5
  • 5
  • 4
  • +1
1 Solution
 
archrajanCommented:
look at this example

 onsubmit="window.open('about:blank','judges','width=750,height=700,menubar=no,toobar=no,scrollbars=yes,resizable=yes')">

0
 
archrajanCommented:
add location=no
0
 
archrajanCommented:
also use single quotes within your double quotes
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
MylorAuthor Commented:
what's location=no for?
0
 
archrajanCommented:
you should use target
0
 
dakydCommented:
If I'm not mistaken, the window.open has to go in an onclick handler, otherwise your link will try to go to some page called window.open('myfile.xls' ...  Is this what you want?  Hope that helps.

<a href="#" onclick="window.open('myfile.xls', 'Window', 'toolbar=no,menubar=no,width=800,height=500,resizable=yes,status=no,top=50,left=100,scrollbars=yes');" target="_new"> Spreadsheet Book</a>
0
 
GwynforWebCommented:
try this

<a href="#" onclick='window.open(" myfile.xls", "Window",
"toolbar=no,menubar=no,width=800,height=500,resizable=yes,status=no,top=50,left=100,scrollbars=yes");return false'>

0
 
archrajanCommented:
location = no takes off the address bar
0
 
GwynforWebCommented:
oop missed the link out

<a href="#" onclick='window.open(" myfile.xls", "Window",
"toolbar=no,menubar=no,width=800,height=500,resizable=yes,status=no,top=50,left=100,scrollbars=yes");return false'>Spreadsheet Book</a>

0
 
MylorAuthor Commented:
Thank you guys,

dakyd, your solution worked fine for me, but still it appears all the address location at the very top, in the title, how can I change that?

Thanks,
0
 
dakydCommented:
I'm not 100% sure, but I don't think you can do much better than that.  And actually, GfW's solution is better than mine in this case, I accidentally left in the target="_new".  That's going to cause you to open more than one new window, which probably isn't what you're looking for.
0
 
MylorAuthor Commented:
Yes I noticed it and I removed before.
Thanks.
0
 
GwynforWebCommented:
I am at a loss as to why  the accepted solution was selected. It open 2 windows one of which shows the address bar. To hide the address from the title bar,  in the page myfile.xls put  <title>My Excellent PAge</tile> to set the title
0
 
GwynforWebCommented:
>>"Yes I noticed it and I removed before."<<

 So you did not try mine?
0
 
GwynforWebCommented:
with out the return false that I included the calling page gets set with the server can not be found page.
0
 
MylorAuthor Commented:
Sorry about that, I guess it was a timing issue.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 5
  • 5
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now