473,657 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hyperlink Control

Hello,

Can you control the window attributes (toolbar, scrollbars, left and right
exc.) when using the hyperlink control as you would when using javascript?

For examle, I am using the following javascript to open another window and
would like to control these attributes with the hyperlink control:
window.open(msg SubmitterInfo,t ,s);return false"
var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
s+= "left=200,top=1 00,width=500,he ight=400";

--
Thanks in advance,
sck10
Nov 18 '05 #1
6 1813
Those aren't attributes; they're parameters, which are passed to the
JavaScript window.open() method. Now, you certainly CAN make the URL of a
hyperlink point to a JavaScript method call:

<a href="javascrip t:window.open(. ..)">Click Here</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"sck10" <sc***@online.n ospam> wrote in message
news:AE******** *************** ***********@mic rosoft.com...
Hello,

Can you control the window attributes (toolbar, scrollbars, left and right
exc.) when using the hyperlink control as you would when using javascript?

For examle, I am using the following javascript to open another window and
would like to control these attributes with the hyperlink control:
window.open(msg SubmitterInfo,t ,s);return false"
var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
s+= "left=200,top=1 00,width=500,he ight=400";

--
Thanks in advance,
sck10

Nov 18 '05 #2
Kevin, along these lines, is there any other way to insert code into an href
without using the "javascript :"? I am allowing users to define certain links
in my system, and want to make sure I filter out anything that might be
malicious. Thanks.

"Kevin Spencer" wrote:
Those aren't attributes; they're parameters, which are passed to the
JavaScript window.open() method. Now, you certainly CAN make the URL of a
hyperlink point to a JavaScript method call:

<a href="javascrip t:window.open(. ..)">Click Here</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"sck10" <sc***@online.n ospam> wrote in message
news:AE******** *************** ***********@mic rosoft.com...
Hello,

Can you control the window attributes (toolbar, scrollbars, left and right
exc.) when using the hyperlink control as you would when using javascript?

For examle, I am using the following javascript to open another window and
would like to control these attributes with the hyperlink control:
window.open(msg SubmitterInfo,t ,s);return false"
var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
s+= "left=200,top=1 00,width=500,he ight=400";

--
Thanks in advance,
sck10


Nov 18 '05 #3
> Kevin, along these lines, is there any other way to insert code into an
href
without using the "javascript :"?
Afraid not, Bill. You'll have to think of a secure way of doing what you
want. If you want JavaScript in hyperlinks, you will get JavaScript in
hyperlinks. The "javascript :" has nothing to do with it, other than
informing the browser that the hyperlink is to a JavaScript function, rather
than to an HTTP URL.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.com... Kevin, along these lines, is there any other way to insert code into an href without using the "javascript :"? I am allowing users to define certain links in my system, and want to make sure I filter out anything that might be
malicious. Thanks.

"Kevin Spencer" wrote:
Those aren't attributes; they're parameters, which are passed to the
JavaScript window.open() method. Now, you certainly CAN make the URL of a hyperlink point to a JavaScript method call:

<a href="javascrip t:window.open(. ..)">Click Here</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"sck10" <sc***@online.n ospam> wrote in message
news:AE******** *************** ***********@mic rosoft.com...
Hello,

Can you control the window attributes (toolbar, scrollbars, left and right exc.) when using the hyperlink control as you would when using javascript?
For examle, I am using the following javascript to open another window and would like to control these attributes with the hyperlink control:
window.open(msg SubmitterInfo,t ,s);return false"
var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
s+= "left=200,top=1 00,width=500,he ight=400";

--
Thanks in advance,
sck10


Nov 18 '05 #4
If I understand you right, I think that's a good thing. Aren't you saying
that if the "javascript :" is not there the browser won't try to "run" it, in
which case I can just exclude any user-defined links that include
"javascript " (e.g. I just remove the word and let the browser give a 404 when
somebody clicks on that "link")?

"Kevin Spencer" wrote:
Kevin, along these lines, is there any other way to insert code into an

href
without using the "javascript :"?


Afraid not, Bill. You'll have to think of a secure way of doing what you
want. If you want JavaScript in hyperlinks, you will get JavaScript in
hyperlinks. The "javascript :" has nothing to do with it, other than
informing the browser that the hyperlink is to a JavaScript function, rather
than to an HTTP URL.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.com...
Kevin, along these lines, is there any other way to insert code into an

href
without using the "javascript :"? I am allowing users to define certain

links
in my system, and want to make sure I filter out anything that might be
malicious. Thanks.

"Kevin Spencer" wrote:
Those aren't attributes; they're parameters, which are passed to the
JavaScript window.open() method. Now, you certainly CAN make the URL of a hyperlink point to a JavaScript method call:

<a href="javascrip t:window.open(. ..)">Click Here</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"sck10" <sc***@online.n ospam> wrote in message
news:AE******** *************** ***********@mic rosoft.com...
> Hello,
>
> Can you control the window attributes (toolbar, scrollbars, left and right > exc.) when using the hyperlink control as you would when using javascript? >
> For examle, I am using the following javascript to open another window and > would like to control these attributes with the hyperlink control:
> window.open(msg SubmitterInfo,t ,s);return false"
> var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
> s+= "left=200,top=1 00,width=500,he ight=400";
>
> --
> Thanks in advance,
> sck10


Nov 18 '05 #5
Hi Bill,
If I understand you right, I think that's a good thing. Aren't you saying
that if the "javascript :" is not there the browser won't try to "run" it, in which case I can just exclude any user-defined links that include
"javascript " (e.g. I just remove the word and let the browser give a 404 when somebody clicks on that "link")?
Correct, as long as we're talking about the href of a hyperlink. Make sure
that they can't add any "onclick" attributes, though, as that would be able
to call JavScript without the "javascript :".

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:1C******** *************** ***********@mic rosoft.com... If I understand you right, I think that's a good thing. Aren't you saying
that if the "javascript :" is not there the browser won't try to "run" it, in which case I can just exclude any user-defined links that include
"javascript " (e.g. I just remove the word and let the browser give a 404 when somebody clicks on that "link")?

"Kevin Spencer" wrote:
Kevin, along these lines, is there any other way to insert code into an
href
without using the "javascript :"?


Afraid not, Bill. You'll have to think of a secure way of doing what you
want. If you want JavaScript in hyperlinks, you will get JavaScript in
hyperlinks. The "javascript :" has nothing to do with it, other than
informing the browser that the hyperlink is to a JavaScript function, rather than to an HTTP URL.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.com...
Kevin, along these lines, is there any other way to insert code into
an href
without using the "javascript :"? I am allowing users to define certain

links
in my system, and want to make sure I filter out anything that might
be malicious. Thanks.

"Kevin Spencer" wrote:

> Those aren't attributes; they're parameters, which are passed to the
> JavaScript window.open() method. Now, you certainly CAN make the URL

of a
> hyperlink point to a JavaScript method call:
>
> <a href="javascrip t:window.open(. ..)">Click Here</a>
>
> --
> HTH,
> Kevin Spencer
> ..Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "sck10" <sc***@online.n ospam> wrote in message
> news:AE******** *************** ***********@mic rosoft.com...
> > Hello,
> >
> > Can you control the window attributes (toolbar, scrollbars, left
and right
> > exc.) when using the hyperlink control as you would when using

javascript?
> >
> > For examle, I am using the following javascript to open another
window and
> > would like to control these attributes with the hyperlink control:
> > window.open(msg SubmitterInfo,t ,s);return false"
> > var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
> > s+= "left=200,top=1 00,width=500,he ight=400";
> >
> > --
> > Thanks in advance,
> > sck10
>
>
>


Nov 18 '05 #6
Got it, thanks.

"Kevin Spencer" wrote:
Hi Bill,
If I understand you right, I think that's a good thing. Aren't you saying
that if the "javascript :" is not there the browser won't try to "run" it,

in
which case I can just exclude any user-defined links that include
"javascript " (e.g. I just remove the word and let the browser give a 404

when
somebody clicks on that "link")?


Correct, as long as we're talking about the href of a hyperlink. Make sure
that they can't add any "onclick" attributes, though, as that would be able
to call JavScript without the "javascript :".

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:1C******** *************** ***********@mic rosoft.com...
If I understand you right, I think that's a good thing. Aren't you saying
that if the "javascript :" is not there the browser won't try to "run" it,

in
which case I can just exclude any user-defined links that include
"javascript " (e.g. I just remove the word and let the browser give a 404

when
somebody clicks on that "link")?

"Kevin Spencer" wrote:
> Kevin, along these lines, is there any other way to insert code into an href
> without using the "javascript :"?

Afraid not, Bill. You'll have to think of a secure way of doing what you
want. If you want JavaScript in hyperlinks, you will get JavaScript in
hyperlinks. The "javascript :" has nothing to do with it, other than
informing the browser that the hyperlink is to a JavaScript function, rather than to an HTTP URL.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bill Borg" <Bi******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.com...
> Kevin, along these lines, is there any other way to insert code into an href
> without using the "javascript :"? I am allowing users to define certain
links
> in my system, and want to make sure I filter out anything that might be > malicious. Thanks.
>
> "Kevin Spencer" wrote:
>
> > Those aren't attributes; they're parameters, which are passed to the
> > JavaScript window.open() method. Now, you certainly CAN make the URL of a
> > hyperlink point to a JavaScript method call:
> >
> > <a href="javascrip t:window.open(. ..)">Click Here</a>
> >
> > --
> > HTH,
> > Kevin Spencer
> > ..Net Developer
> > Microsoft MVP
> > I get paid good money to
> > solve puzzles for a living
> >
> > "sck10" <sc***@online.n ospam> wrote in message
> > news:AE******** *************** ***********@mic rosoft.com...
> > > Hello,
> > >
> > > Can you control the window attributes (toolbar, scrollbars, left and right
> > > exc.) when using the hyperlink control as you would when using
javascript?
> > >
> > > For examle, I am using the following javascript to open another window and
> > > would like to control these attributes with the hyperlink control:
> > > window.open(msg SubmitterInfo,t ,s);return false"
> > > var s="toolbar=no,d irectories=no,s crollbars=yes,r esizable=yes,";
> > > s+= "left=200,top=1 00,width=500,he ight=400";
> > >
> > > --
> > > Thanks in advance,
> > > sck10
> >
> >
> >


Nov 18 '05 #7

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

Similar topics

0
1461
by: TheMan | last post by:
I am having trouble getting my HyperLink control to go to the desired navigation page. I have an image control on an ASP.NET page. When that image control is clicked it creates a HyperLink control with the respective properties, but it does not go to the desired page that I want. I do not know how to make the new HyperLink control execute so that it was as if the HyperLink was clicked. Here is the code: private void Image1_Click(object...
0
1327
by: Tom Jorgenson | last post by:
I need to create a custom control that behaves like a HyperLink control EXCEPT where I can get into the events somewhere to programmatically decided whether to actually perform the link request, or to refuse it. Why? Because I want to use these links on forms that may have unsaved changes - and I don't want them to lose the changes by clicking on the hyperlink. Unfortunately, I find the web controls bewildering. I would have thought...
0
550
by: Ryan Harvey | last post by:
Hi all, I have written a web user control that contains a repeater control. the ItemTemplate for this control is basically 6 Hyperlinks in a row, that are dynamically allocated one of 7 gif images as the ImageURL of the Hyperlink. When a load the page with the controls on it works fine, but sometimes the images are broken, but if i hit refresh i get random selections of the gifs appearing and not appearing. if i hit Back button to a page...
5
2070
by: JerryK | last post by:
Hi, I am trying to put a hyperlink to a .cer (certificate) file on a form. Normally (on a ,htm page) when the user clicks on the hyperlink, the file is not recognized and the user is given the option to save the file. This is the desired result. However, when I put the hyperlink on a webform, the file is opened and it's binary contents are displayed on the screen. Does anyone know why this happens? The hyperlink is as follows:
1
9224
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the Hyperlink control to create a graphical Hyperlink. However, I want to change the size of the image I am using, but the generated HTML places the width/height properties in the anchor tag rather than the image tag. Obviously I could write code to generate the anchor/image tags myself, but when a control as nice as the Hyperlink already exists I want to know if there is any kind of workaround that will...
8
3789
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a System.Web.UI.WebControls.Image Control or a HyperLink and Image Controls, but the onMouseOver and onMouseOut attributes must be in the <img> tag. If I were to use the HyperLink's ImageUrl property and add the attributes using the...
10
2278
by: David Thielen | last post by:
Hi; I have help html pages for each page of my ASP.NET webapp. So for the page datasource.aspx, I have help\datasource.htm. Bu what I want when the hyperlink is clicked, for it to look for the following files in order (assuming I am running from the us): help\datasource_en_US.htm help\datasource_en.htm help\datasource.htm
20
2990
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is a control. I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx" which are in both the folder "/jobseeker/" and "/employer/". I have a user control "displayCompanyJobs.ascx" that is in my /applicant/
3
2953
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather than the <imgtag, therefore not making the image the size I want. I can obviously place an Image control inside the HyperLink, but the HyperLink was obviously intended to render both. Is there a way around this without using multiple controls?...
5
8801
LAD
by: LAD | last post by:
Using Access 2003 on Windows 2000. My Skill Level: Med Low (Some VBA, okay with Access) Form: Single View - based on Query of single Table to sort by field. Application: Dealers email 'contract packages' that include as attachments: a contract (PDF or TIF), a pricing tool (Excel), a companion document (Word). Clerks detach these files into a shared drive file on our intranet. I'm building an 'contract package management' application...
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5636
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.