473,386 Members | 1,775 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,386 software developers and data experts.

Open a new browser window problem!!

Hello,

I have a aspx page on which I have a button. In the click event method
in code-behind I do some processing and now need to open a new window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks

Aug 24 '06 #1
5 1380
Yes the onload method is probably the best way.
Another way would be to embed the JavaScript call to the method at the end
of the page.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello,

I have a aspx page on which I have a button. In the click event method
in code-behind I do some processing and now need to open a new window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks

Aug 24 '06 #2
I'd appreciate if you could provide me with the exact steps that I need
to do.

I need to know how to call this onload method from the button click
event. Do I first create a onclick attribute in the <bodysection of
aspx? If yes, then how do I handle the parameter that is being passed?
And what code should I write in button event handler to call this
onload function?

Thanks,

Steve C. Orr [MVP, MCSD] wrote:
Yes the onload method is probably the best way.
Another way would be to embed the JavaScript call to the method at the end
of the page.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello,

I have a aspx page on which I have a button. In the click event method
in code-behind I do some processing and now need to open a new window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks
Aug 25 '06 #3
I suggest you just use the free control at the link I provided.
Scroll down to see the Popup window opener control.
The source code is included and a description for it so you can understand
in more detail how it works if you choose.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
I'd appreciate if you could provide me with the exact steps that I need
to do.

I need to know how to call this onload method from the button click
event. Do I first create a onclick attribute in the <bodysection of
aspx? If yes, then how do I handle the parameter that is being passed?
And what code should I write in button event handler to call this
onload function?

Thanks,

Steve C. Orr [MVP, MCSD] wrote:
>Yes the onload method is probably the best way.
Another way would be to embed the JavaScript call to the method at the
end
of the page.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googleg roups.com...
Hello,

I have a aspx page on which I have a button. In the click event method
in code-behind I do some processing and now need to open a new window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks

Aug 25 '06 #4
thanks, but i cannot use that control. I need to build this
functionality.

Steve C. Orr [MVP, MCSD] wrote:
I suggest you just use the free control at the link I provided.
Scroll down to see the Popup window opener control.
The source code is included and a description for it so you can understand
in more detail how it works if you choose.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
I'd appreciate if you could provide me with the exact steps that I need
to do.

I need to know how to call this onload method from the button click
event. Do I first create a onclick attribute in the <bodysection of
aspx? If yes, then how do I handle the parameter that is being passed?
And what code should I write in button event handler to call this
onload function?

Thanks,

Steve C. Orr [MVP, MCSD] wrote:
Yes the onload method is probably the best way.
Another way would be to embed the JavaScript call to the method at the
end
of the page.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello,

I have a aspx page on which I have a button. In the click event method
in code-behind I do some processing and now need to open a new window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks
Aug 25 '06 #5
Then examine its well documented source code to see how it works, and build
a similar solution from it.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
thanks, but i cannot use that control. I need to build this
functionality.

Steve C. Orr [MVP, MCSD] wrote:
>I suggest you just use the free control at the link I provided.
Scroll down to see the Popup window opener control.
The source code is included and a description for it so you can
understand
in more detail how it works if you choose.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@h48g2000cwc.googleg roups.com...
I'd appreciate if you could provide me with the exact steps that I need
to do.

I need to know how to call this onload method from the button click
event. Do I first create a onclick attribute in the <bodysection of
aspx? If yes, then how do I handle the parameter that is being passed?
And what code should I write in button event handler to call this
onload function?

Thanks,

Steve C. Orr [MVP, MCSD] wrote:
Yes the onload method is probably the best way.
Another way would be to embed the JavaScript call to the method at the
end
of the page.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<na****@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googleg roups.com...
Hello,

I have a aspx page on which I have a button. In the click event
method
in code-behind I do some processing and now need to open a new
window
in another browser and pass a couple of parameters.

I included in my aspx file, the following js function:

function OpenChecklist(strCaseID)
{
var url = "/ABC/DEF.aspx?qsSubjectID=" + strSubjectID
var f =
"width=700,height=450,left=75,top=75,status=no,too lbar=no,menubar=no,location=no";
window.open(url,"Subject Checklist",f)
}

My codebehind has the following
Public Sub cmdSubject_ServerClick(ByVal sender As System.Object,
ByVal
e As System.EventArgs) Handles cmdSubject.ServerClick

--do some processing here
-- now would like a way to call the method (passing some parameters)
and opening a new browser window

End Sub
Now how do I call this function, not from the onclick() event but
from
within the click event procedure?

One way I was told is using onload function. Would appreciate is
someone could provide some more details on how to do this?

Thanks


Aug 25 '06 #6

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

Similar topics

1
by: Joe | last post by:
In the following code, page1.asp is inside the frame of main.html. When the user click submit button in page1.asp, it will submit the for and open a new window called page2.asp. When the user...
10
by: Simon Wigzell | last post by:
Is there any way to create and open a window in javascript so that links in other websites won't "steal" it? I've written a web page with a form for people to enter headlines and URLs from...
13
by: Dave Holmes | last post by:
Is there a way to keep an other application from opening a link in a browser where I am running an ASP application? For example, I have an ASP application open in a browser. If I click on a link...
7
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...
1
by: vba man | last post by:
I've used the following code to open a browser window and read the data to a file. I know there is another way using a query, but that doesn't work for this application. What I'd like to be able...
1
by: ipellew | last post by:
Hi; I open another browser window for help. It stays open untill I press help on my main web window again to close this help. If I "reload" the main window with this help page open in the...
19
by: catmansa | last post by:
Is there anyway to determine the present pixel height & width size of a open browser window? :)
6
by: bushi | last post by:
hi everyone! i have diplayed my hyperlinks in a iframe.when i redirect to next page.the next page also open in the same frame,but i want to open a new browser window,when i click on the...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
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,...
0
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...
0
Oralloy
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,...

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.