I have an image button on my page that runs some javascript:
<asp:ImageButto n runat="server" id="ImageButton 3"
ImageUrl="Graph ics/Help.png" AlternateText=" Help"
onclientclick=" javascript:Show Help('help_rent .aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another
page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan 6 3829
onclientclick=" ShowHelp('help_ rent.aspx');ret urn false;" />
-- bruce (sqlwork.com);
Jonathan Wood wrote:
I have an image button on my page that runs some javascript:
<asp:ImageButto n runat="server" id="ImageButton 3"
ImageUrl="Graph ics/Help.png" AlternateText=" Help"
onclientclick=" javascript:Show Help('help_rent .aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from
another page--but it also refreshes the current page, which I want to
prevent.
How do I stop the default behavior?
Jonathan
Works! Thanks.
--
Jonathan Wood
SoftCircuits Programming http://www.softcircuits.com
"Teemu Keiski" <jo****@aspalli ance.comwrote in message
news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
Hi,
add ";return false;" after call to ShowHelp()
--
Teemu Keiski
AspInsider, ASP.NET MVP http://blogs.aspadvice.com/joteke http://teemukeiski.net
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:eO******** ******@TK2MSFTN GP06.phx.gbl...
>>I have an image button on my page that runs some javascript:
<asp:ImageButt on runat="server" id="ImageButton 3" ImageUrl="Grap hics/Help.png" AlternateText=" Help" onclientclick= "javascript:Sho wHelp('help_ren t.aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan
Wow. Active group. Thanks.
--
Jonathan Wood
SoftCircuits Programming http://www.softcircuits.com
"bruce barker" <no****@nospam. comwrote in message
news:uz******** ******@TK2MSFTN GP03.phx.gbl...
onclientclick=" ShowHelp('help_ rent.aspx');ret urn false;" />
-- bruce (sqlwork.com);
Jonathan Wood wrote:
>I have an image button on my page that runs some javascript:
<asp:ImageButt on runat="server" id="ImageButton 3" ImageUrl="Grap hics/Help.png" AlternateText=" Help" onclientclick= "javascript:Sho wHelp('help_ren t.aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan
And I assume you mean to change the call to onclientclick=" javascript :retu rn
ShowHelp('help_ desc.aspx')"
Thanks.
--
Jonathan Wood
SoftCircuits Programming http://www.softcircuits.com
"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:e1******** *****@TK2MSFTNG P02.phx.gbl...
You can have ShowHelp() return false, as well.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************** *************** *************** ****
| Think outside the box! |
*************** *************** *************** ****
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:eO******** ******@TK2MSFTN GP06.phx.gbl...
>>I have an image button on my page that runs some javascript:
<asp:ImageButt on runat="server" id="ImageButton 3" ImageUrl="Grap hics/Help.png" AlternateText=" Help" onclientclick= "javascript:Sho wHelp('help_ren t.aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan
You can have ShowHelp() return false, as well.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:eO******** ******@TK2MSFTN GP06.phx.gbl...
>I have an image button on my page that runs some javascript:
<asp:ImageButto n runat="server" id="ImageButton 3"
ImageUrl="Graph ics/Help.png" AlternateText=" Help"
onclientclick=" javascript:Show Help('help_rent .aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another
page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan
Pretty much anything that sends back a false will interrupt the postback.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:uO******** ********@TK2MSF TNGP02.phx.gbl. ..
And I assume you mean to change the call to
onclientclick=" javascript:retu rn ShowHelp('help_ desc.aspx')"
Thanks.
--
Jonathan Wood
SoftCircuits Programming http://www.softcircuits.com
"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:e1******** *****@TK2MSFTNG P02.phx.gbl...
>You can have ShowHelp() return false, as well.
-- Gregory A. Beamer MVP, MCP: +I, SE, SD, DBA
************** *************** *************** ***** | Think outside the box! | ************** *************** *************** ***** "Jonathan Wood" <jw***@softcirc uits.comwrote in message news:eO******* *******@TK2MSFT NGP06.phx.gbl.. .
>>>I have an image button on my page that runs some javascript:
<asp:ImageBut ton runat="server" id="ImageButton 3" ImageUrl="Gra phics/Help.png" AlternateText=" Help" onclientclick ="javascript:Sh owHelp('help_re nt.aspx')" />
ShowHelp() is a function that I create that calls window.open().
It works okay--it pops up a separate help window with content from another page--but it also refreshes the current page, which I want to prevent.
How do I stop the default behavior?
Jonathan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Petersen |
last post by:
Is there a way to prevent a page postback from being added to the browser
history without using SmartNavigation?
I'd like to be able to do this in a cross-browser compatible way (modern
standards-compliant browsers).
I've seen tons of articles on how to maintain scroll position and focus, but
what about this other feature of SmartNavigation?
Anyone know of a base page class that could accomplish this? Or do I have to
wait for Whidbey?
|
by: Marcelo |
last post by:
Hi,
I have an ImageButton which, when clicked, redirects to another page. The
problem is that page A (where the ImageButton is located) has lots of
information, but when I click the button, it redraws the header of the
table, which we'd like not to happen.
My question is: Is there any way of prevent this postback? Or, is there any
way of, in Page_Load, detect that it is happening due the click on the
button, so I could redirect it...
|
by: Rob |
last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish to return to each Postback URL, but rather only the initial page URL. Is there a way to prevent Postback URL's from being added to the browser's history list
Thanks in advance for any help.
|
by: Itai |
last post by:
How does smartNavigation prevent Postback URL's from being added to
the browser History?
|
by: Simon |
last post by:
Hi, I need to prevent Internet Explorer to save the page in history
collection when it is in PostBack.
To try do this I have put this code:
protected override void OnLoad( EventArgs evt)
{
if (IsPostBack)
Response.Cache.SetNoStore();
.....
base.OnLoad( evt);
| |
by: william |
last post by:
Hi,
I have a datagrid, inside there is a templete item, it's button. I want to
do some thing when user click the button, but do not want the postback event
happens. How can I do it?
Thanks.
william
|
by: =?Utf-8?B?RGF2ZQ==?= |
last post by:
Hi,
I've managed to drag and drop my webparts but is there a way to prevent the
page postback flicker using ajax/atlas? i've read it was possible with the
beta version.
Dave
|
by: Eric |
last post by:
I have a linkbutton on a form that executes a script, it works fine except
that it posts back to the calling form first. Is there a way to prevent
this? I tried setting the PostBackURL property to the form the script
launches but that resulted in some strange behavior.
TIA
|
by: akshalika |
last post by:
I have RegularExpression Validator which check textbox has some text fortmat. It should fire client side but it fire with postback. How to prevent postback????
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
| |