On some websites I've seen by clicking on a button or hlink a new IE browser
window is spawned that does NOT have any toolbar (ie No back button, etc...)
How can I do this on my ASPX page?
Thanks. 8 1925
JavaScript. Find a site that has that functionality you like and view the
source of the page. Copy and paste into your code. Since it is JavaScript
it will be viewable in the source unlike VB.NET or C# code that would
otherwise be compiled into IL.
Good luck.
Mark
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE
browser window is spawned that does NOT have any toolbar (ie No back button,
etc...) How can I do this on my ASPX page?
Thanks.
Below is an example that will get you started ... it spawns the new window,
but includes a toolbar.
//JavaScript that opens a hyperlink in a new browser window.
StringBuilder sb = new StringBuilder() ;
sb.Append("<scr ipt language=\"java script\">" + Environment.New Line);
sb.Append("<!--"+ Environment.New Line);
sb.Append("func tion popup(mylink, windowname)"+ Environment.New Line);
sb.Append("{"+ Environment.New Line);
sb.Append("if (! window.focus)re turn true;"+ Environment.New Line);
sb.Append("var href;"+ Environment.New Line);
sb.Append("if (typeof(mylink) == 'string')"+ Environment.New Line);
sb.Append("href =mylink;"+ Environment.New Line);
sb.Append("else "+ Environment.New Line);
sb.Append("href =mylink.href;"+ Environment.New Line);
sb.Append("wind ow.open(href,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t
ion=yes,toolbar =yes');"+ Environment.New Line);
sb.Append("retu rn false;"+ Environment.New Line);
sb.Append("}"+ Environment.New Line);
sb.Append("//-->"+ Environment.New Line);
sb.Append("</script>"+ Environment.New Line);
LiteralControl lc = new LiteralControl( sb.ToString());
this.Controls.A dd(lc);
hth, mark www.dovetaildatabases.com
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE
browser window is spawned that does NOT have any toolbar (ie No back button,
etc...) How can I do this on my ASPX page?
Thanks.
window.open () function accepts a toolbar and menubar parameter you can set
these to no
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE
browser window is spawned that does NOT have any toolbar (ie No back button,
etc...) How can I do this on my ASPX page?
Thanks.
VBProgrammer,
If you want, I created a Javascript component that has a few commonly used
javascripts in it that makes it easy to attach them to a page and then any
object on the page. A popup window with options for exactly what parts to
display is one of the functions. I provide it for free and the entire
project is downloadable from my web site, www.aboutfortunate.com. Just
click the code library link and then click the "Javascript " button in the
menu on the left.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at: www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE
browser window is spawned that does NOT have any toolbar (ie No back button,
etc...) How can I do this on my ASPX page?
Thanks.
No offence, but how about something a little more elegant, readable, and a
bit faster, and doesnt require the use ot a Literal
Add the following to your Page_Load (you can even make the the string a
static readonly field on your page class)
string popupScript =
@"<script language=""java script"">
<!--
function popup(mylink, windowname) {
if (! window.focus)re turn true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.hre f;
window.open(hre f,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t
ion=yes,toolbar =yes');
return false;
}
//-->
</script>";
RegisterClientS criptBlock("pop up" , s);
Or place the script in a separate file (ie popup.js) and add the following
to the top of your page:
<script language="javas cript" src="popup.js" >
HTH
Brian W
"Mark" <fi************ **@umn.edu> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Below is an example that will get you started ... it spawns the new
window, but includes a toolbar.
//JavaScript that opens a hyperlink in a new browser window. StringBuilder sb = new StringBuilder() ; sb.Append("<scr ipt language=\"java script\">" + Environment.New Line); sb.Append("<!--"+ Environment.New Line); sb.Append("func tion popup(mylink, windowname)"+ Environment.New Line); sb.Append("{"+ Environment.New Line); sb.Append("if (! window.focus)re turn true;"+ Environment.New Line); sb.Append("var href;"+ Environment.New Line); sb.Append("if (typeof(mylink) == 'string')"+ Environment.New Line); sb.Append("href =mylink;"+ Environment.New Line); sb.Append("else "+ Environment.New Line); sb.Append("href =mylink.href;"+ Environment.New Line); sb.Append("wind ow.open(href,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t ion=yes,toolbar =yes');"+ Environment.New Line); sb.Append("retu rn false;"+ Environment.New Line); sb.Append("}"+ Environment.New Line); sb.Append("//-->"+ Environment.New Line); sb.Append("</script>"+ Environment.New Line); LiteralControl lc = new LiteralControl( sb.ToString()); this.Controls.A dd(lc);
hth, mark www.dovetaildatabases.com
"VB Programmer" <gr*********@ go-intech.com> wrote in message news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE browser window is spawned that does NOT have any toolbar (ie No back button, etc...) How can I do this on my ASPX page?
Thanks.
I'd agree that in most cases that would be faster and more elegant. The
code I copied from was in the
protected override void CreateChildCont rols()
event of a custom control. In custom controls, you can't paste in raw
script like you can in a .aspx or user control.
Mark
"Brian W" <brianw@gold_de ath_2_spam_rush .com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. No offence, but how about something a little more elegant, readable, and a bit faster, and doesnt require the use ot a Literal
Add the following to your Page_Load (you can even make the the string a static readonly field on your page class)
string popupScript = @"<script language=""java script""> <!-- function popup(mylink, windowname) { if (! window.focus)re turn true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.hre f; window.open(hre f,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t ion=yes,toolbar =yes'); return false; } //--> </script>"; RegisterClientS criptBlock("pop up" , s);
Or place the script in a separate file (ie popup.js) and add the following to the top of your page:
<script language="javas cript" src="popup.js" >
HTH Brian W
"Mark" <fi************ **@umn.edu> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Below is an example that will get you started ... it spawns the new window, but includes a toolbar.
//JavaScript that opens a hyperlink in a new browser window. StringBuilder sb = new StringBuilder() ; sb.Append("<scr ipt language=\"java script\">" + Environment.New Line); sb.Append("<!--"+ Environment.New Line); sb.Append("func tion popup(mylink, windowname)"+ Environment.New Line); sb.Append("{"+ Environment.New Line); sb.Append("if (! window.focus)re turn true;"+ Environment.New Line); sb.Append("var href;"+ Environment.New Line); sb.Append("if (typeof(mylink) == 'string')"+ Environment.New Line); sb.Append("href =mylink;"+ Environment.New Line); sb.Append("else "+ Environment.New Line); sb.Append("href =mylink.href;"+ Environment.New Line); sb.Append("wind ow.open(href,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t ion=yes,toolbar =yes');"+ Environment.New Line); sb.Append("retu rn false;"+ Environment.New Line); sb.Append("}"+ Environment.New Line); sb.Append("//-->"+ Environment.New Line); sb.Append("</script>"+ Environment.New Line); LiteralControl lc = new LiteralControl( sb.ToString()); this.Controls.A dd(lc);
hth, mark www.dovetaildatabases.com
"VB Programmer" <gr*********@ go-intech.com> wrote in message news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE browser window is spawned that does NOT have any toolbar (ie No back button, etc...) How can I do this on my ASPX page?
Thanks.
> event of a custom control. In custom controls, you can't paste in raw script like you can in a .aspx or user control.
Sure you can. That is what Page.RegisterCl ientScriptBlock () is for.
Brian W
Mark
"Brian W" <brianw@gold_de ath_2_spam_rush .com> wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. No offence, but how about something a little more elegant, readable, and
a bit faster, and doesnt require the use ot a Literal
Add the following to your Page_Load (you can even make the the string a static readonly field on your page class)
string popupScript = @"<script language=""java script""> <!-- function popup(mylink, windowname) { if (! window.focus)re turn true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.hre f; window.open(hre f,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t ion=yes,toolbar =yes'); return false; } //--> </script>"; RegisterClientS criptBlock("pop up" , s);
Or place the script in a separate file (ie popup.js) and add the
following to the top of your page:
<script language="javas cript" src="popup.js" >
HTH Brian W
"Mark" <fi************ **@umn.edu> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Below is an example that will get you started ... it spawns the new window, but includes a toolbar.
//JavaScript that opens a hyperlink in a new browser window. StringBuilder sb = new StringBuilder() ; sb.Append("<scr ipt language=\"java script\">" + Environment.New Line); sb.Append("<!--"+ Environment.New Line); sb.Append("func tion popup(mylink, windowname)"+ Environment.New Line); sb.Append("{"+ Environment.New Line); sb.Append("if (! window.focus)re turn true;"+ Environment.New Line); sb.Append("var href;"+ Environment.New Line); sb.Append("if (typeof(mylink) == 'string')"+ Environment.New Line); sb.Append("href =mylink;"+ Environment.New Line); sb.Append("else "+ Environment.New Line); sb.Append("href =mylink.href;"+ Environment.New Line); sb.Append("wind ow.open(href,
windowname,'wid th=700,height=4 00,scrollbars=y es,status=yes,m enubar=yes,loca t ion=yes,toolbar =yes');"+ Environment.New Line); sb.Append("retu rn false;"+ Environment.New Line); sb.Append("}"+ Environment.New Line); sb.Append("//-->"+ Environment.New Line); sb.Append("</script>"+ Environment.New Line); LiteralControl lc = new LiteralControl( sb.ToString()); this.Controls.A dd(lc);
hth, mark www.dovetaildatabases.com
"VB Programmer" <gr*********@ go-intech.com> wrote in message news:e7******** ******@TK2MSFTN GP09.phx.gbl... > On some websites I've seen by clicking on a button or hlink a new IE browser > window is spawned that does NOT have any toolbar (ie No back button, etc...) > > How can I do this on my ASPX page? > > Thanks. > >
Thanks EVERYONE for their insight and help!!! This newsgroup is awesome.
"VB Programmer" <gr*********@ go-intech.com> wrote in message
news:e7******** ******@TK2MSFTN GP09.phx.gbl... On some websites I've seen by clicking on a button or hlink a new IE
browser window is spawned that does NOT have any toolbar (ie No back button,
etc...) How can I do this on my ASPX page?
Thanks.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Scott |
last post by:
I'm new to ASP, but I've been programming in VB for
several years, and I'm having a few issues with this ASP
enhancement I'm working on. I've found ASP to be a lot
different than what I'm use to in VB.
I've created an ASP interface where a user can select an
email group that populates a listbox with those email
addresses. If a user sees an email in that list that they
do not want then they can remove it by clinking the Delete
button...
|
by: Chris |
last post by:
Hi
I have designed my website to fit my standard windows.
I use a javascript scroller that nescitates the removal of the browser
scroll bars. However if a user has an extra toolbar open in his browser
like a google or yahoo toolbar or a links toolbar it pushes the content down
and slightly out of view. I don't want to use a pop up window with
toolbars=0 as this is often blocked by software. What I would like is to
open the...
|
by: Richard Gutery |
last post by:
G'day. Trying to open a new window in an ASP script.
Here is the code snippet I am trying to use:
private sub OpenWin()
window.open
"utils/progbar.htm","progress","toolbar=no,scrollbars=no,width=200,height=150,menubar=no,location=no,resizable=no"
end sub
I've tried this:
private sub OpenWin()
|
by: tmb |
last post by:
- Want to open a 2nd browser window when someone clinks a link with the link
content inside it.
- Want to control window size
- Want all tool bars so only blue bar at top shows
- Can I put my content in the blue bar?
- Only options are Minimize, Maximize or Close (top right of blue bar)
1 - What is the difference in 'OpenWindow' and 'Spawn' ??
2 - Can anyone point me to a simple script I can use... or just post one...
|
by: darius |
last post by:
Hello,
I seem to be having trouble with a rather simple problem. I am opening a new
window with the window.open command, and even though I set scrollbar=yes, I
can't seem to get the window to display a vertical scrollbar when the text
exceeds the height of the window i just openned (on a side note, ideally I
would like to just have a vertical scrollbar).
My code follows. Thank you,
~Dari
| |
by: Merlin |
last post by:
Hi there,
I have a problem with opening new windows with JS. If the webpage did not
complete loading due to any reason a click on a link which is supposed to open a
small new other window loads instead the home page. If the page completes
loading the link is working perfect.
Here is the code:
<a href="#"
onclick="open_center('/subapp_profiles/member-information.php?id=00000028',475,500);return
|
by: Kamyk |
last post by:
Hello all!
I would like to open a new window with a picture after clicking on a
shrinked picture which is located on the main page. I want this new window
to be
exactly sized as original dimensions of this image.
Where is the error on the following code??? :
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
function rozmiar(rysuneczek,id)
|
by: Dave |
last post by:
For some reason, the below lines only work on select machines. All
machines are running IE6. IE SP's and OS's vary. When it doesn't
work, default.aspx (the page that this code is in) opens and closes.
That's all you see. TSReminder.aspx doesn't even open. I'm not sure
what's going on here.
Response.Write("<script...
|
by: Socrates |
last post by:
Hi - Have tried for half and hour to get this script to work:
I am trying to close the parent window while opening a centred new
child window
I would be grateful if someone could correct the script below which
does open a new window, but not in a centred position.
Here is the link to the url:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |