Showing posts with label hyperlink. Show all posts
Showing posts with label hyperlink. Show all posts

Tuesday, March 13, 2012

target size

I know how to use javascript to open a hyperlink in a resized window without
toolbars. But would it be better to do so from the code behind pages and if
so, how? which classes? Thanks

Buzother than the code behind setting the url for hyperlink, you got it.

-- bruce (sqlwork.com)

"Buz Waitz" <bwaitz@.sbcglobal.net> wrote in message
news:O3hohLmUEHA.716@.TK2MSFTNGP11.phx.gbl...
> I know how to use javascript to open a hyperlink in a resized window
without
> toolbars. But would it be better to do so from the code behind pages and
if
> so, how? which classes? Thanks
> Buz
>I know how to use javascript to open a hyperlink in a resized window without
>toolbars. But would it be better to do so from the code behind pages and if
>so, how? which classes? Thanks
>Buz

I am pretty sure u need to use javascript, but if u want to call the
javascript from the codebehind try this:

this.RegisterClientScriptBlock("","insertscripthere");

-Adam
client script blocks will not work with xp service pack 2 for this
application. in code behind you can only set the javascript url of the
hyperlink.

-- bruce (sqlwork.com)

<ashelley@.inlandkwpp.com> wrote in message
news:h1fsc090oq4j60kn9lt5rdsicmupjii3a9@.4ax.com...
> >I know how to use javascript to open a hyperlink in a resized window
without
> >toolbars. But would it be better to do so from the code behind pages and
if
> >so, how? which classes? Thanks
> >Buz
> I am pretty sure u need to use javascript, but if u want to call the
> javascript from the codebehind try this:
> this.RegisterClientScriptBlock("","insertscripthere");
> -Adam
On Tue, 15 Jun 2004 11:01:30 -0700, "bruce barker"
<nospam_brubar@.safeco.com> wrote:

>client script blocks will not work with xp service pack 2 for this
>application. in code behind you can only set the javascript url of the
>hyperlink.
>-- bruce (sqlwork.com)

interesting.

function popUp(wUrl,wName,wOpts)
{
//x y are set to current cursor location already
var newWindow;
newWindow = window.open('',wName,wOpts);
if(newWindow)
{

newWindow.document.write('<body><center>wait...</center></body>');
newWindow.document.close();
newWindow.moveTo(x,y);
newWindow.focus();
newWindow.location = wUrl;
}
}

and call

this.RegisterClientScriptBlock("","<script
language='javascript'>popUp('someurl','windowname','someoptions');</script>");

this won't work with xp sp 2?

-Adam

target size

I know how to use javascript to open a hyperlink in a resized window without
toolbars. But would it be better to do so from the code behind pages and if
so, how? which classes? Thanks
Buzother than the code behind setting the url for hyperlink, you got it.
-- bruce (sqlwork.com)
"Buz Waitz" <bwaitz@.sbcglobal.net> wrote in message
news:O3hohLmUEHA.716@.TK2MSFTNGP11.phx.gbl...
> I know how to use javascript to open a hyperlink in a resized window
without
> toolbars. But would it be better to do so from the code behind pages and
if
> so, how? which classes? Thanks
> Buz
>
>I know how to use javascript to open a hyperlink in a resized window without
>toolbars. But would it be better to do so from the code behind pages and if
>so, how? which classes? Thanks
>Buz
>
I am pretty sure u need to use javascript, but if u want to call the
javascript from the codebehind try this:
this.RegisterClientScriptBlock("","insertscripthere");
-Adam
client script blocks will not work with xp service pack 2 for this
application. in code behind you can only set the javascript url of the
hyperlink.
-- bruce (sqlwork.com)
<ashelley@.inlandkwpp.com> wrote in message
news:h1fsc090oq4j60kn9lt5rdsicmupjii3a9@.
4ax.com...
without
if
> I am pretty sure u need to use javascript, but if u want to call the
> javascript from the codebehind try this:
> this.RegisterClientScriptBlock("","insertscripthere");
> -Adam
On Tue, 15 Jun 2004 11:01:30 -0700, "bruce barker"
<nospam_brubar@.safeco.com> wrote:

>client script blocks will not work with xp service pack 2 for this
>application. in code behind you can only set the javascript url of the
>hyperlink.
>-- bruce (sqlwork.com)
>
interesting.
function popUp(wUrl,wName,wOpts)
{
//x y are set to current cursor location already
var newWindow;
newWindow = window.open('',wName,wOpts);
if(newWindow)
{
newWindow.document.write('<body><center>wait...</center></body>');
newWindow.document.close();
newWindow.moveTo(x,y);
newWindow.focus();
newWindow.location = wUrl;
}
}
and call
this.RegisterClientScriptBlock("","<script
language='javascript'> popUp('someurl','windowname','someoption
s');</script>"
);
this won't work with xp sp 2?
-Adam

Targeting an <IFRAME> in code

Hi,
I manage to open a PDF file in an <IFRAME> by "clicking" on an HyperLink
with:
HyperLink.NavigateURL = "file:///C:\file.pdf"
HyperLink.Target = "iframename"
The question is... How can I do the same thing by "clicking" on a
button'
I searched in the System.Web.UI.HtmlControls collection and I can't find
the IFRAME object...
Any ideas?
Thanks in advance
CCAn IFRAME is simply HTML in a Page:
<iframe src ="/something.aspx"></iframe>
Add a runat=server to it, and an HtmlGeneric Control behind it, if you want
to manipulate it programmatically.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
<carlos.cruz@.algeco.pt> wrote in message
news:ecdJl6kFEHA.3252@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I manage to open a PDF file in an <IFRAME> by "clicking" on an HyperLink
> with:
> HyperLink.NavigateURL = "file:///C:\file.pdf"
> HyperLink.Target = "iframename"
> The question is... How can I do the same thing by "clicking" on a
> button'
> I searched in the System.Web.UI.HtmlControls collection and I can't find
> the IFRAME object...
> Any ideas?
> Thanks in advance
> CC
Hi,
I'm sorry but I don't undertand what you mean by putting a generic html
control behind the iframe. Could you be more specific?
Thanks
CC
Every Control (that is part of the Page definition) in the Page Template has
a corresponding object declaration in the CodeBehind class. In this case,
you would have to add it yourself. What software are you using to develop
your app?
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
<carlos.cruz@.algeco.pt> wrote in message
news:ub13YbmFEHA.3448@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm sorry but I don't undertand what you mean by putting a generic html
> control behind the iframe. Could you be more specific?
> Thanks
> CC