|
-
Apr 8th, 2005, 10:32 AM
#1
Thread Starter
Hyperactive Member
Pop Up window
Hi!
I am working on an application. I am using ASP.net with VB.Net as code behind.
I am coding in the code behind page to display some links (the text of which comes from the table).
heres the code,
VB Code:
Dim r As TableRow
Dim c As TableCell
Dim Hyp As HyperLink
c = New TableCell
Hyp = New HyperLink
Hyp.NavigateUrl = "Address.aspx?OmniId=" & OmniId & "&SubOffId= " & SubOffID
Hyp.Text = Address
c.Controls.Add(Hyp)
r.Cells.Add(c)
tblDetails.Rows.Add(r)
Next j
End If
'**************************************
See that I am making hyperlink with the code:
VB Code:
Hyp = New HyperLink
Hyp.NavigateUrl = "Details.aspx?OmniId=" & OmniId & "&SubOffId= " & SubOffID
Hyp.Text = Address
But, I want to open the subsequent page as a popup (Details.aspx). How to achieve that??
-
Apr 8th, 2005, 10:38 AM
#2
Thread Starter
Hyperactive Member
Re: Pop Up window
This is the code:
VB Code:
Dim r As TableRow
Dim c As TableCell
Dim Hyp As HyperLink
c = New TableCell
Hyp = New HyperLink
Hyp.NavigateUrl = "Details.aspx?OmniId=" & OmniId & "&SubOffId= " & SubOffID
Hyp.Text = Address
c.Controls.Add(Hyp)
r.Cells.Add(c)
tblDetails.Rows.Add(r)
Hyp.NavigateUrl opens Details.aspx as another page. I want it as a pop up ( a new browser window).
-
Apr 8th, 2005, 11:27 AM
#3
Thread Starter
Hyperactive Member
Re: Pop Up window
I figured it out....its done through..
Hyp.Target = "_blank"
after the Hyp.NavigateUrl
But, can I adjust the size of the new browser window?
-
Apr 8th, 2005, 11:32 AM
#4
Thread Starter
Hyperactive Member
Re: Pop Up window
Can it be done using Javascript?
-
Apr 8th, 2005, 04:58 PM
#5
Frenzied Member
Re: Pop Up window
window.open('daWindow', url, 500, 500);
Magiaus
If I helped give me some points.
-
Apr 12th, 2005, 01:18 PM
#6
Thread Starter
Hyperactive Member
Re: Pop Up window
I know the javascript function? My problem is how to call the javascript function from the link, i have made in the code behind.
Had I to call the function from the click of a button, I would have used this code
bt.Attributes.Add("onclick", "return OpenWindow();")
Will it work in case of a link also?
-
Apr 12th, 2005, 01:23 PM
#7
Frenzied Member
Re: Pop Up window
Code:
href="javascript:popWindow();"
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|