470,641 Members | 1,463 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

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 1295
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Simon Wigzell | last post: by
13 posts views Thread by Dave Holmes | last post: by
7 posts views Thread by Merlin | last post: by
1 post views Thread by ipellew | last post: by
???
1 post views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.