473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How can I use "menubar=no"

In JavaScript, I can hide menu bar
( ex)
<html>
<SCRIPT LANGUAGE="JavaScript">
function Test()
{
var win =
window.open("test2.html","sale","menubar=no,scroll bars=no,width=780,height=5
40,top=0,left=0")
window.opener = "OPENER_IS_NOT_NULL";
window.close();
}

</SCRIPT>
<body>
<input id="ttt" type="button" onClick="Test()">
</body>
</html>

I want to adopt this in default.aspx.
So. In Browser, http://.../default.aspx --> menu bar is not displayed in
browser.

But I don't know this in asp.net.
Nov 18 '05 #1
2 5324
There are several ways to harness a button click to make it do client side
stuff. I show one way below. Not sure if this is responsive to your
question....

Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim sb As New System.Text.StringBuilder
sb.Append("<SCRIPT LANGUAGE=""JavaScript"">")
sb.Append("{")
sb.Append("var win =")
sb.Append("window.open('http://www.gc.ca','sale',")
sb.Append("'menubar=no,scrollbars=no,")
sb.Append("width=780,height=540,top=0,left=0');")
sb.Append("window.opener = 'OPENER_IS_NOT_NULL';")
sb.Append("window.close();")
sb.Append("}")
sb.Append("</SCRIPT>")
Literal1.Text = sb.ToString
End Sub

<form id="Form1" method="post" runat="server">
<P>
<asp:Button id="Button1" runat="server" Text="Click
Me"></asp:Button></P>
<P>
<asp:Literal id="Literal1" runat="server"></asp:Literal></P>
</form>

Ken
MVP [ASP.NET]

"edgarjang" <ed*******@msn.com> wrote in message
news:uM**************@TK2MSFTNGP10.phx.gbl...
In JavaScript, I can hide menu bar
( ex)
<html>
<SCRIPT LANGUAGE="JavaScript">
function Test()
{
var win =
window.open("test2.html","sale","menubar=no,scroll bars=no,width=780,height=5
40,top=0,left=0")
window.opener = "OPENER_IS_NOT_NULL";
window.close();
}

</SCRIPT>
<body>
<input id="ttt" type="button" onClick="Test()">
</body>
</html>

I want to adopt this in default.aspx.
So. In Browser, http://.../default.aspx --> menu bar is not displayed in
browser.

But I don't know this in asp.net.


Nov 18 '05 #2
I'm not sure there is some tricky tips for your request but usually you
cannot hide/show layout components (menu, toolbar...) of current web browser
(which currently contain your web page).

There is simple way (but annoy visitor), put window.onload method in your
default.aspx, which open other window with menubar=0, which is second
default page e.g. default2.aspx (using window.open) and then close current
window (which contain default.aspx).

Tiendq,
ti**@tienonsoftware.com

"edgarjang" <ed*******@msn.com> wrote in message
news:uM**************@TK2MSFTNGP10.phx.gbl...
In JavaScript, I can hide menu bar
( ex)
<html>
<SCRIPT LANGUAGE="JavaScript">
function Test()
{
var win =
window.open("test2.html","sale","menubar=no,scroll bars=no,width=780,height=5 40,top=0,left=0")
window.opener = "OPENER_IS_NOT_NULL";
window.close();
}

</SCRIPT>
<body>
<input id="ttt" type="button" onClick="Test()">
</body>
</html>

I want to adopt this in default.aspx.
So. In Browser, http://.../default.aspx --> menu bar is not displayed in
browser.

But I don't know this in asp.net.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michael Stevens | last post by:
Probably the wrong wording but since I'm not a scripter I won't claim to know what I'm talking about. I got this script from www.htmlgoodies.com <script language="JavaScript"> <!--...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
1
by: Chris | last post by:
Morning, This is my problem, I try to pass in url parameter yop.php the PID value, computed in "select", but when I execute this script, I obtain "this.PID" in all letters in URL instead of the...
21
by: Evan Sussman | last post by:
Could any one give me an explenation of this error? I get it every once in a while, and it really is a pain. currently the code that I'm working with goes like this <script> <!-- var...
7
by: MLH | last post by:
Is there any case you can imagine that A97 would NOT display the Unhide option under the Window menu after running this line... Me.Visible = False Yes, its happening to me. The Unhide choice...
2
by: GD | last post by:
I have an ImageButton in a Repeater, and in the Repeater's OnItemDataBound event, I'd like to add some code that will let the ImageButton open a URL in a new window. This is what I have in my...
3
by: gouthami | last post by:
I have a tree Node in my application and i have set the following code in the NavigateUrl property of the tree node. Please see my code below (which is present in my 'code behind' c# file). My...
1
by: Ronen Yacov | last post by:
Hi There, I've using IE 7.0.5730.11 on Windows XP. I want to open a pop up using javascript without showing the status bar, and to do so I use the function: function openwindow() {...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.