Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Thursday, March 29, 2012

Pop Up Window Name - Would like it to be timestamp

Hi,

I'm an asp programmer currently in the low process of converting one of my asp intranets into asp.net (vb).

This is going to be one of many questions i ask on the forum (glad I've found it) !

I have a link a page that opens up popup window (removes all the buttons from the nav bar, chromless effect).

I would normally do the following at the top of the page:

<script language=javascript runat=server>
function GetTimeInMillisec()
{
var Now = new Date()
var TimeStamp = Now.getTime()

return TimeStamp
}
</script>
<%
varTimeStamp = GetTimeInMillisec()
%
Then the link would be:

<a href="http://links.10026.com/?link=javascript:launchwin('frameset.asp','<%=varTimeStamp%>','width='+(screen.width-11)+',height='+(screen.height-92)+',screenX=0,screenY=0,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=1,status=1,toolbar=0,top=0,left=0,resizable=yes')">Open</a
Can someone give me some pointers on how I am able pass a timestamp value (or another random character string) into the name of the window.

The reason I want this is in case a user wants to be able to have multiple instances of the system open.

Thank you
James Campbell

I take it you have a js function called launchwin? If so can you not set it there? If you want to use a .net datetime when the page was created use <%=DateTime.Now%>

There's few options depending on what your requirements are..


Hi,

Yes I have a js function called launchwin. Reading your post just makes me think that I am thinking too hard about a very simple problem !

Thanks for the nudge in the right direction.

James


To complete this thread I now have:

<a href="http://links.10026.com/?link=javascript:launchwin('System/Login.aspx','<%=DateTime.Now.toString("mmssffffff")%>','width='+(screen.width-11)+',height='+(screen.height-92)+',screenX=0,screenY=0,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=1,status=1,toolbar=0,top=0,left=0,resizable=yes')">Launch</a
Thanks jibber !

James

Pop Up Window with Server.Transfer

Hi,

In one of my asp.net page, when users click on a button, I am using Server.Transfer to redirect user to another page and pass all the info to that page asServer.Transfer("TripDetails.aspx").

I need to open a new window and pass all the info to new page. How can I achive this? How can I open a new window and useServer.Transfer at the same time?

Thanks

On the click event of the button you'll need to open a new window there using javascript like window.open. If the button is submitting a form you can set the TARGET of the FORM to be _blank;

<FORM target="_blank" action="...">


Thanks Aidy, it works for me.

pop up window using javascript

hi how can I open this link in new pop up window using javascript?
<asp:HyperLink id="HLink_Amex" runat="server" NavigateUrl="images/cvv_amex.g
if">Amex?</asp:HyperLink>
mahsamahsa,
Try set Target=_blank
Thomas Andersson
"mahsa" wrote:

> hi how can I open this link in new pop up window using javascript?
> <asp:HyperLink id="HLink_Amex" runat="server" NavigateUrl="images/cvv_amex
.gif">Amex?</asp:HyperLink>
> --
> mahsa
And if you're not generating the URL or the HyperLink control dynamically in
code, you might be better off using a standard HTML Anchor as in
<A href="http://links.10026.com/?link=images/cvv_amex.gif" target="_blank">Amex?</A>
Why have a runat="server" when the server isn't adding anything to the
picture? It's a waste of server resources.
Dale Preston
MCAD, MCSE, MCDBA
"crexes" <crexes@.discussions.microsoft.com> wrote in message
news:902C6D44-D451-411B-A69B-50C1C2DE30FF@.microsoft.com...
> mahsa,
> Try set Target=_blank
> Thomas Andersson
> "mahsa" wrote:
>
NavigateUrl="images/cvv_amex.gif">Amex?</asp:HyperLink>

pop up window using javascript

hi how can I open this link in new pop up window using javascript?
<asp:HyperLink id="HLink_Amex" runat="server" NavigateUrl="images/cvv_amex.gif">Amex?</asp:HyperLink
--
mahsamahsa,

Try set Target=_blank

Thomas Andersson

"mahsa" wrote:

> hi how can I open this link in new pop up window using javascript?
> <asp:HyperLink id="HLink_Amex" runat="server" NavigateUrl="images/cvv_amex.gif">Amex?</asp:HyperLink>
> --
> mahsa
And if you're not generating the URL or the HyperLink control dynamically in
code, you might be better off using a standard HTML Anchor as in

<A href="http://links.10026.com/?link=images/cvv_amex.gif" target="_blank">Amex?</A
Why have a runat="server" when the server isn't adding anything to the
picture? It's a waste of server resources.

Dale Preston
MCAD, MCSE, MCDBA

"crexes" <crexes@.discussions.microsoft.com> wrote in message
news:902C6D44-D451-411B-A69B-50C1C2DE30FF@.microsoft.com...
> mahsa,
> Try set Target=_blank
> Thomas Andersson
> "mahsa" wrote:
> > hi how can I open this link in new pop up window using javascript?
> > <asp:HyperLink id="HLink_Amex" runat="server"
NavigateUrl="images/cvv_amex.gif">Amex?</asp:HyperLink>
> > --
> > mahsa

Pop Up windows

Hello,
What is the best approach to bringing up pop-up windows to verify a users
request. (i.e. - "Are you sure you want to delete? yes no)
I know how to bring the window up in javascript...but once the user click
"yes" in the new pop-up window, I need to somehow invoke a delete call in
the c# code behind of the original page.
Any help would be appreciated.
Thanks.Using either a Button or LinkButton control, you can add the "onclick"
attribute to it and place the javascript code in there.
For example:
lnkCancel.Attributes.Add("onclick", "return window.confirm('Are you sure
you want to cancel this order?');");
If the user clicks OK, the button will submit and the appropriate
code-behind for the button will be executed. If the user clicks cancel,
then the form will not submit.
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
"Bilbo" <Bilbo@.cox.net> wrote in message
news:OcSpUe6iEHA.3876@.TK2MSFTNGP15.phx.gbl...
> Hello,
> What is the best approach to bringing up pop-up windows to verify a users
> request. (i.e. - "Are you sure you want to delete? yes no)
> I know how to bring the window up in javascript...but once the user click
> "yes" in the new pop-up window, I need to somehow invoke a delete call in
> the c# code behind of the original page.
> Any help would be appreciated.
> Thanks.
>

Pop Up windows

Hello,

What is the best approach to bringing up pop-up windows to verify a users
request. (i.e. - "Are you sure you want to delete? yes no)

I know how to bring the window up in javascript...but once the user click
"yes" in the new pop-up window, I need to somehow invoke a delete call in
the c# code behind of the original page.

Any help would be appreciated.

Thanks.Using either a Button or LinkButton control, you can add the "onclick"
attribute to it and place the javascript code in there.

For example:

lnkCancel.Attributes.Add("onclick", "return window.confirm('Are you sure
you want to cancel this order?');");

If the user clicks OK, the button will submit and the appropriate
code-behind for the button will be executed. If the user clicks cancel,
then the form will not submit.

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"Bilbo" <Bilbo@.cox.net> wrote in message
news:OcSpUe6iEHA.3876@.TK2MSFTNGP15.phx.gbl...
> Hello,
> What is the best approach to bringing up pop-up windows to verify a users
> request. (i.e. - "Are you sure you want to delete? yes no)
> I know how to bring the window up in javascript...but once the user click
> "yes" in the new pop-up window, I need to somehow invoke a delete call in
> the c# code behind of the original page.
> Any help would be appreciated.
> Thanks.

Pop up windows

Hi,

How to make pop up window from code behine without using
java script. And another thing is that, how to pass value
from the pop up window to a form if there is a textbox in
the pop up. ThanksMaking popup windows is a client task and as such it can be done only with
client tools. The only way to create a popup is javascript showModalDialog
call.

You can pass a value back from popup in window.returnValue property. The
javascript showModalDialog statement that started the popup will get this
value as a result of the call.

Eliyahu

"Souljaz" <Souljaz@.discussions.microsoft.com> wrote in message
news:1ddd01c52de9$9e89fb80$a401280a@.phx.gbl...
> Hi,
> How to make pop up window from code behine without using
> java script. And another thing is that, how to pass value
> from the pop up window to a form if there is a textbox in
> the pop up. Thanks

Pop Up Window..ASP.NET

Hi,
I have a webform with a button.
When the user moves their mouse over the button.. I would
like to initiate a mouseover event that shows a small
window with text.. The text will be populated from a
dataset...
Does anyone here know how to do this?
I have code that does the mouseover in javascript.. A
window even pops up.. but I am not sure how to send
dynamic text to this window...
I hope I am being clear enough..
A tooltip would be ok if I could get the data to show up
in 2 lines neatly.. ie
DATAROW 1
DATAROW 2
Any ideas?
ThanksThere are a couple of possibilities.
1. Dynamically create the Window.Open() URL to include enough information to
pull from a database.
2. Feed the data into JavaScript when the page is initially called and
create a tooltip. If you cannot easily do it with HTML, consider setting up
a
layer and painting it on the mouseover event.
NOTE: The second option is more difficult to implement, as different
browsers render layers differently (some older browsers will not render at
all), so the option is more applicable to a controlled environment, like an
Intranet.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"seep" wrote:

> Hi,
> I have a webform with a button.
> When the user moves their mouse over the button.. I would
> like to initiate a mouseover event that shows a small
> window with text.. The text will be populated from a
> dataset...
> Does anyone here know how to do this?
> I have code that does the mouseover in javascript.. A
> window even pops up.. but I am not sure how to send
> dynamic text to this window...
> I hope I am being clear enough..
> A tooltip would be ok if I could get the data to show up
> in 2 lines neatly.. ie
> DATAROW 1
> DATAROW 2
> Any ideas?
> Thanks
>
Check out this article,
http://www.microsoft.com/india/msdn...endarinASP.aspx
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"seep" <seep@.hotmail.com> wrote in message
news:140501c4e775$ae32c810$a301280a@.phx.gbl...
> Hi,
> I have a webform with a button.
> When the user moves their mouse over the button.. I would
> like to initiate a mouseover event that shows a small
> window with text.. The text will be populated from a
> dataset...
> Does anyone here know how to do this?
> I have code that does the mouseover in javascript.. A
> window even pops up.. but I am not sure how to send
> dynamic text to this window...
> I hope I am being clear enough..
> A tooltip would be ok if I could get the data to show up
> in 2 lines neatly.. ie
> DATAROW 1
> DATAROW 2
> Any ideas?
> Thanks
>

Pop Up Window..ASP.NET

Hi,
I have a webform with a button.
When the user moves their mouse over the button.. I would
like to initiate a mouseover event that shows a small
window with text.. The text will be populated from a
dataset...

Does anyone here know how to do this?
I have code that does the mouseover in javascript.. A
window even pops up.. but I am not sure how to send
dynamic text to this window...

I hope I am being clear enough..
A tooltip would be ok if I could get the data to show up
in 2 lines neatly.. ie

DATAROW 1
DATAROW 2

Any ideas?

ThanksThere are a couple of possibilities.

1. Dynamically create the Window.Open() URL to include enough information to
pull from a database.

2. Feed the data into JavaScript when the page is initially called and
create a tooltip. If you cannot easily do it with HTML, consider setting up a
layer and painting it on the mouseover event.

NOTE: The second option is more difficult to implement, as different
browsers render layers differently (some older browsers will not render at
all), so the option is more applicable to a controlled environment, like an
Intranet.

--

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"seep" wrote:

> Hi,
> I have a webform with a button.
> When the user moves their mouse over the button.. I would
> like to initiate a mouseover event that shows a small
> window with text.. The text will be populated from a
> dataset...
> Does anyone here know how to do this?
> I have code that does the mouseover in javascript.. A
> window even pops up.. but I am not sure how to send
> dynamic text to this window...
> I hope I am being clear enough..
> A tooltip would be ok if I could get the data to show up
> in 2 lines neatly.. ie
> DATAROW 1
> DATAROW 2
> Any ideas?
> Thanks
>
Check out this article,
http://www.microsoft.com/india/msdn...endarinASP.aspx

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"seep" <seep@.hotmail.com> wrote in message
news:140501c4e775$ae32c810$a301280a@.phx.gbl...
> Hi,
> I have a webform with a button.
> When the user moves their mouse over the button.. I would
> like to initiate a mouseover event that shows a small
> window with text.. The text will be populated from a
> dataset...
> Does anyone here know how to do this?
> I have code that does the mouseover in javascript.. A
> window even pops up.. but I am not sure how to send
> dynamic text to this window...
> I hope I am being clear enough..
> A tooltip would be ok if I could get the data to show up
> in 2 lines neatly.. ie
> DATAROW 1
> DATAROW 2
> Any ideas?
> Thanks

pop up windows and triggering an event after closed

Hello everyone -

I have a javascript onclick event that pops up a window,
allows the user to view information, and then close the window.

Now - I would like to be notified when this window is closed
in the asp.net page that pops it up.

Or - better yet - is there a way to popup the window in a modal mode
where the user must close the window prior to returning to the main web
application (and if at all possible - trigger an event when they are done)?

here is my current javascript for the poup window...

function upload_window()
{
var left = (screen.availWidth/2) - (600/2);
var top = (screen.availHeight/2) - (225/2);
var colorWin = window.open('upload_maps.aspx', "test", 'scrollbars=0, toolbar=0, statusbar=0, width=600, height=225, left='+left+', top='+top);
document.edit_maps_form.submit();
}

thanks for your help!!

take care
tonyThere's no way to do it server-side, but you COULD add JavaScript to do something to the window's opener when the popup window closes, i.e. window.opener.....
2) To show a modal window, use: window.showModalDialog('somepage.aspx','winName','dialogHeight:200px;dialogWidth:200px; etc..');
Remember, this only works with IE.

1) To notify the aspx page when the new window is closed, you can write Javascript:
window.opener.document.FormNameFromASPXPage.someTextBox.Text = "new win is closed";

Pop up windows

Hi,
How to make pop up window from code behine without using
java script. And another thing is that, how to pass value
from the pop up window to a form if there is a textbox in
the pop up. ThanksMaking popup windows is a client task and as such it can be done only with
client tools. The only way to create a popup is javascript showModalDialog
call.
You can pass a value back from popup in window.returnValue property. The
javascript showModalDialog statement that started the popup will get this
value as a result of the call.
Eliyahu
"Souljaz" <Souljaz@.discussions.microsoft.com> wrote in message
news:1ddd01c52de9$9e89fb80$a401280a@.phx.gbl...
> Hi,
> How to make pop up window from code behine without using
> java script. And another thing is that, how to pass value
> from the pop up window to a form if there is a textbox in
> the pop up. Thanks

pop up windows

Hi!

I have programmed in Java and Windows form but very new to ASP and web in general. It is very primitive question but currently, I do not know. I want a small pop up windows with close or the like button that will appear when I click on a button. In Java or NET, you can use show method but in ASP or Webmatrix in particular, what component should I use .

Regards.Hello, check my BLOG, I have an article on how to pop up a window from inside ASP.NET

regards
I'm sure haidar's blog shows the proper method - but to help clear up for future knowledge..
Popping up a web page is a client-side event. The .Net server can't feed a popup to your browser- think of all the uncontrollable popups that would occur if the server-side could do this. opening a popup is a clients-ide event using javascript (window.open method)
Hope that helps - and it's a common question - understanding what events are client-side and what are server-side will help avoid confusion
Of course the contents of the popup can be totally designed (perhaps as a web user control) on the server side from within .NET and then merely instanciated in the javascipt. This gives full access to all of the .NET design environment features for the pop-up.

ps: I have not read the blog entry, so that *may* how it is done there also...
Hi!

I use Javascript but as very primitive programmer, I just am able to have this code:

<a onclick="window.open('materialchecking.aspx textbox=txtStartDate','cal','width=250,height=225,left=270,top=180')" href="http://links.10026.com/?link=javascript:;">
<input type="button" value="Check" /></a
It works fine as static page. However, what if I want to transfer some variable value from main page to the pop up windows to do the checking or other way around, do ing some data processing when button is clicked and transfer the result in to the pop up. I guess, there should be other approach as the href is perhaps too simple to do that.

Regards.
Hello, please check my BLOG below, I have an article on how to pop up windows inside asp.net

regards
Sorry!

I did not go to Pop up before and just went to your personal website and could not see the article (!1).

OK. But now question is that I want to transfer some data between master page and pop up windows. How is it possible. Suppose pop up windows is to show the number of stock in record and in store is not different. So when button is clicked, I have top go to server-side database to do something and finally transfer thw TWO number to the pop up. So how to do that.

Thank you so much for your attention.
ok, you might use the Querystring to pass values to the child window

regards
Hi!

I would really appreaciate if you can show me a bit of code to pass A VALUE to child windows.

Regards.
using function in blog...


*************************************
Javascript pop up window script
*************************************
<SCRIPT TYPE="text/javascript">
<!--
function popupform(myform, url, windowname)
{
// don't allow if we don't have the focus
if (! window.focus)return true;

// open the new window,
window.open(url, windowname, 'width=250,height=225,left=270,top=180,scrollbars=yes');
myform.target=windowname;
return true;
}
//-->
</SCRIPT>

then in your link...


<a onclick="popupform(this,'materialchecking.aspx?id='+ document.getElementById('textbox1').value,'cal')" href="http://links.10026.com/?link=javascript:"><input type="button" value="Check" /></a>
</body>
<input type="button" value="Check" /></a>

one of many ways probably .......

HTH
Hi!

Please forgive me if I apprea to be a bit dump. I am quite new to the field. As far as I understand, the call: document.getElementById is to set the value of textbox 1 to cal var. So in the pop up page, which command I should use to EXTRACT that value for use.
In MSDN page, i says that we can pass a colection of value. That is fine, Juts search var by id inb Collection. But I mean what command to EXTRACT those value in the page after we pass that value in the open up command.

To help make it clear, suppose I have an page asking for the invoice number. As within an invoice, there can be many materials with different quantity and price so I decide that after use enter the Supplier and Invoice number, user will be presented with Pop up windows that has text box and dropdownlist to enter list of data. But in this Pop up windows , the Supplier name and invoice name shold be present. I am looking for way to show the Suplier name and Invoice number on the Pop up windows.

Thank you very much for your attention.
in the example - the id of the invoice is being passed using "querystring"
if you look up at the address of this forum page- you will see "?tabindex=1&PostID=782635&mode=flat"
or something like that - this is called the querystring. It is passed as part of the url the client is requesting. In this example there are 3 things being passed - tabindex,postid, and mode
On the page being called- you can access theses values by using

dim myPostID as string
dim myTabIndex as string
dim myMode as string

myPostID = request.querystring("tabindex")
myTabIndex = request.querystring("PostID")
myMode = request.querystring("mode")

then i can use this any way i need to such as..
Sub Page_Load()
dim mySQL as string="Select * from posts WHERE PostId=" & MyPostID
....................

not exact code - but you get the idea

if on the first page, you already hace the supplier and invoice number - then you can pass that in the querystring as such

a onclick="popupform(this,'materialchecking.aspx?Supplier='+ document.getElementById('textbox1').value+ "&Invoice=" + document.getElementById('textbox2').value,'mypopupwindow_name')"

on the recieving page materialchecking.aspx - you would use

Sub Page_Load()
dim MySupplier as string = request.querystrin("Supplier")
dim MyInvoice as string = request.querystrin("Invoice")

HTH
Thank you uncleb1

They all work now. Apart from "&Invoice=" I have to change to '&Invoice' (!!!!cheer), all work and I learn a lot from this doing. Thank you
Hi again!

Now there is more challenge. Suppose I have an textbox that must be filled. I use RequiredValidator. Problem is that with "normal" button, I can write the code for validator but I do not know how for the ´button, created with javascript. Basically, the Pop up windows only works if textbox is not empty.
if you used this function


<SCRIPT TYPE="text/javascript">
<!--
function popupform(myform, url, windowname)
{
// don't allow if we don't have the focus

if (! window.focus)return true;
// open the new window,
window.open(url, windowname, 'width=250,height=225,left=270,top=180,scrollbars=yes');
myform.target=windowname;
return true;
}
//-->
</script>
......... you have a place to check for null

<SCRIPT TYPE="text/javascript">
<!--
function popupform(myform, url, windowname)
{

// don't allow if textbox is blank
if documet.getElementById(textbox1).value="" return true;

// don't allow if we don't have the focus
if (! window.focus)return true;
// open the new window,
window.open(url, windowname, 'width=250,height=225,left=270,top=180,scrollbars=yes');
myform.target=windowname;
return true;
}
//-->
</script>

or you could use a serverside asp textbox and use the built in asp validation - check out this tutorial
http://www.dotnetjunkies.com/QuickStart/aspplus/default.aspx?url=/quickstart/aspplus/doc/webvalidation.aspx

HTH

Pop Up without TitleBars?

Hello All!
I have been trying to customize pop up windows for my ASP.NET Page. I want
to have a custom title bar. Is there a way to remove the windows title bar
from the pop up and make it apear as a frameless window?
Also I am using Windows XP with SP1.
If you know a way out, please help me!
Regards
Jyoti> Hello All!
> I have been trying to customize pop up windows for my ASP.NET Page. I want
to
> have a custom title bar. Is there a way to remove the windows title bar fr
om
> the pop up and make it apear as a frameless window?
> Also I am using Windows XP with SP1.
> If you know a way out, please help me!
> Regards
> Jyoti
I don't think that is possible, mainly for security reasons.
The fact that *you* are using a particular platform is not important
here, you will need to know what your *visitors* are using.
Hans Kesting
Thanks for replying Hans!
The point is that my application should work for the visitors using Windows
XP! And its not working there! Well, I am still trying to find a way out.
Thanks for your help!
Regards Jyoti
"Hans Kesting" <news.1.hansdk@.spamgourmet.com> wrote in message
news:mn.724c7d5b866fd633.41829@.spamgourmet.com...
> I don't think that is possible, mainly for security reasons.
> The fact that *you* are using a particular platform is not important here,
> you will need to know what your *visitors* are using.
> Hans Kesting
>

Pop Up without TitleBars?

Hello All!

I have been trying to customize pop up windows for my ASP.NET Page. I want
to have a custom title bar. Is there a way to remove the windows title bar
from the pop up and make it apear as a frameless window?

Also I am using Windows XP with SP1.
If you know a way out, please help me!

Regards
Jyoti> Hello All!
> I have been trying to customize pop up windows for my ASP.NET Page. I want to
> have a custom title bar. Is there a way to remove the windows title bar from
> the pop up and make it apear as a frameless window?
> Also I am using Windows XP with SP1.
> If you know a way out, please help me!
> Regards
> Jyoti

I don't think that is possible, mainly for security reasons.

The fact that *you* are using a particular platform is not important
here, you will need to know what your *visitors* are using.

Hans Kesting
Thanks for replying Hans!

The point is that my application should work for the visitors using Windows
XP! And its not working there! Well, I am still trying to find a way out.
Thanks for your help!

Regards Jyoti

"Hans Kesting" <news.1.hansdk@.spamgourmet.com> wrote in message
news:mn.724c7d5b866fd633.41829@.spamgourmet.com...
>> Hello All!
>>
>> I have been trying to customize pop up windows for my ASP.NET Page. I
>> want to have a custom title bar. Is there a way to remove the windows
>> title bar from the pop up and make it apear as a frameless window?
>>
>> Also I am using Windows XP with SP1.
>> If you know a way out, please help me!
>>
>> Regards
>> Jyoti
> I don't think that is possible, mainly for security reasons.
> The fact that *you* are using a particular platform is not important here,
> you will need to know what your *visitors* are using.
> Hans Kesting

Pop up with AJAX enable page

help pls. I just add the Ajax tools on my page and now my pop up code is not working.
Page.ClientScript.RegisterStartupScript(Me.GetType, "myscript", "<script Language='JavaScript'>alert('" + x + "');</script>")
tnxPage.Clientscript.RegisterStartupScript(me,"scriptAlert","alert('test');",True);

Look at the last parameter.
Page.Clientscript.RegisterStartupScript(me,"scriptAlert","alert('test');",True)

error on "me" - cannot be converted to 'system.type'

any other solution pls... tnx
Sorry, my bad.

Page.ClientScript.RegisterStartupScript(Me.GetType, "scriptAlert", "alert('test');", True)
Sorry, my bad.

Page.ClientScript.RegisterStartupScript(Me.GetType, "scriptAlert", "alert('test');", True)

:D it's me again. ive tried your code but still no pop up message :(. this code works if you dont have Ajax updatepanel but in my case i used AJAX Updatepanel. any help pls.

tnx
Does this help?

http://www.asp.net/AJAX/Documentation/Live/tutorials/CustomizingErrorHandlingforUpdatePanel.aspx
Does this help?

http://www.asp.net/AJAX/Documentation/Live/tutorials/CustomizingErrorHandlingforUpdatePanel.aspx

yes it helpz. tnx to all

pop up windows with img and text from...?

using vb.net, with sql 2000 personal edition.

I'm trying to create a portfolio page, the pages would be divided into years from 2001 ~ 2004 with each page a link of projects that my company has done. when the link is clicked it would open a new window with both image and text.

my question is how should i build this pop up page, with over 90 images i do not want to create individual aspx pop up windows, so if i was to get img and text info where should it be coming from? would sql server or is there was a to put this info in the project page? I haven't a clue, plz help.

ps. if you can point me to an example on the net that would be great..

focusA good place to start may be the following tutorial:
A Robust Image Gallery for ASP.NET
wow thanks NewKid2~

i'm still reading it but its a great example, not only for my project but for my personal use as well, also i love the fact that its in vb.net there should be a page called top 10 everyday examples in vb.net for the noobie in you!

focus
> there should be a page called top 10 everyday examples in vb.net

Well, the same guys have written a bunch of ASP.NET articles, most of them using VB.NET, and all written in an easy-to-understand way.

You can see the entire list of their articles here:
http://aspnet.4guysfromrolla.com

Pop Ups

Hi

I am using a popup, I launch the popup from a form, the user then choses an item on the popup, which is put into a session variable and then another form is launched. This works OK except the original form which launched the popup is still open how do I close it when the popup is launch. I use the code below to launch the popup

Dim sTempAsString

sTemp = "<script>window.open('LPopUpContractor.aspx',null,'top=150,left=250,height=150,width=450,status=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=no');</script>"

Response.Write(sTemp)

Response.Flush()

Thanks

Louisa

Hi,
you can close the form from its container window,
<!-- Put this script in MyMainForm.aspx -->
<script type="text/javascript">
window.open('myPopupForm.aspx');
window.close();
</script>

or let the popup close the window that launched it,
<!-- Put this script in myPopupForm.aspx -->
<script type="text/javascript">
if(window.opener) {
window.opener.close();
}
</script>

This works brillantly, but I now get a popup before mine saying:

The Web page you are viewing is trying to close the window

Do you want to close this window?

I click on the yes and my popup appears, how do I get rid of the error msg popup?

Thanks

Louisa


Hi,
it is not an error message popup, it is an Internet Explorer security setting that prevents a script to close a window that wasn't opened by the script itself, without the user permission... well, it seems that a workaround exists for Internet Explorer, just try to set the window.opener property to some value. For example
<script type="text/javascript">
window.opener = this;
window.open('myPopup.aspx');
window.close();
</script>

but I'm not sure it will work on all browsers.


Hi,

The above doesn't seem to work for me as it just puts the pages into a loop, can I not close a previous page from the page load of the new page, when the new page is fully loaded?

Thanks

Louisa


Hi,
I don't know if a workaround exists for the security popup. Try to post this question in theClient Side Web Develoment section of these forums.

a little discussion about that same pop-up

http://forums.asp.net/962609/ShowPost.aspx


Hi,
thanks for posting the link, onewisehobbit.

pop ups

Is there any way to programmatically open pop ups with SP2? My ASP.NET site
uses JavaScript to open new browser windows and they are being shut down
automatically...Pop up blockers don't block windows that are opened by the same domain as
the page that is loaded.

"mareal" <m@.m.com> wrote in message
news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
> Is there any way to programmatically open pop ups with SP2? My ASP.NET
> site
> uses JavaScript to open new browser windows and they are being shut down
> automatically...
Thank you Scott. I am not sure I am following. My browser even blocks
Microsoft pop ups from this forum unless I allow them.

I was hoping to find some kind of command to allow my site to open new
browser windows (overwriting pop ups directives)

"Scott M." wrote:

> Pop up blockers don't block windows that are opened by the same domain as
> the page that is loaded.
> "mareal" <m@.m.com> wrote in message
> news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
> > Is there any way to programmatically open pop ups with SP2? My ASP.NET
> > site
> > uses JavaScript to open new browser windows and they are being shut down
> > automatically...
>
The pop ups you get from various web sites (including MS) don't actually
have content that comes from the domain you are visiting. Most companies
have special servers dedicated to just serving up the advertising content
(ad servers). For example, the content of a popup ad that you got while
visiting cnn.com might actually be coming from http://ads.cnn.com and the
content of the popup windows you get while visiting Microsoft's web site
might actually be coming from http://ads.microsoft.com.

When you build a web page that includes the window.open() client-side
scripting command that doesn't mean that a popup blocker will prevent that
window from opening. Most popup blockers look to see where the content of
that new window is coming from. If it is from the same domain as the page
that launched it, the popup will be allowed, if not it won't.

For example, visit this page that I built and run for my son's cub scout
pack (http://pack96.org/Calendar/PackCalendar.aspx) and click on one of the
links. You will see that the popup windows do not get blocked even though
your popup blocker is on.

-Scott

"mareal" <m@.m.com> wrote in message
news:DD978129-4376-435E-8F35-C4F80209AD1F@.microsoft.com...
> Thank you Scott. I am not sure I am following. My browser even blocks
> Microsoft pop ups from this forum unless I allow them.
> I was hoping to find some kind of command to allow my site to open new
> browser windows (overwriting pop ups directives)
> "Scott M." wrote:
>> Pop up blockers don't block windows that are opened by the same domain as
>> the page that is loaded.
>>
>> "mareal" <m@.m.com> wrote in message
>> news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
>> > Is there any way to programmatically open pop ups with SP2? My ASP.NET
>> > site
>> > uses JavaScript to open new browser windows and they are being shut
>> > down
>> > automatically...
>>
>>
>

Pop Up?

I set the ValidationSummary control's ShowMessageBox property to display
error message in a dialog box.
But I found it only works with IE, Not Netscape.

Did someone have it work ever?

Thanks.Hi,

Validations got server and client side validation. When you browse your
pages in Netscape they use the server-side validation and not the
client-side validation as the client side Validation scripts only works
only with IE.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Pop Up/Refresh Issue

I have a parent page that contains a datagrid. On this page is a link to "Add New" record. I have done this by opening a child/pop up so they can enter the data in a new window. When the user submits, the parent page reloads and refreshes the data. Here is the code in the child page:

btnAdd.Attributes.Add("onclick", "window.opener.location.reload();");

I kinda have two problems here, one I can live with...for now.

Problem 1: When the page reloads, the user has to click "Retry". This works, but is a bit sloppy. I've searched a few different methods on this forum, but none seem to submit and refresh my data. (I can't simply refresh because I have a few panels on the parent that throw a wrench into it)

Problem 2: The line that I posted earlier is fine, and works well; however I do have some validation (server side) on the child form. If the validation in the btnAdd_Click event isn't a success, I would like to avoid reloading the parent. How would I go about doing that?

Thanks.

Just to clarify a bit, I want to check a condition before I have my js reload the parent page.

Let's say:

If (someCondition)

{

//reload parent page

}

else

{

// don't reload parent page

}

Any suggestions?


Instead of spamming the forum with much of the same problem, I'll add to this one.

I would also like to somehow clear the last submmited button on the parent from the child. Let me try to explain.

On the parent the user may press a button which kicks off validation on the server. If validation on the server fails, a message on the page is displayed. (Parent) Now, if the user decides to add a record at this time via the pop up or child, hitting update on the child will reload the parent page; however, in this case my grid on the parent won't refresh because it's executing the submit on the parent. Therefore displaying "validation failed", when in fact it didn't.

Eh, I know this probably sounds messy, but if someone can help with this or any of my other pop up/refresh problems in this thread, I would appreciate it.


I don't know of this is going to help you or not but here is my 2cents. On the child pop up page when the user submits the informationyou can send a value of true to the parent which will represent thatthe child form has been submitted. This value can be send usingQueryString or Session State. When the parent page recieves thisinformation it can referesh it.
Does that help ?