Jump to content
Software FX Community

problem with series links


User (Legacy)

Recommended Posts

I am trying to set a javascript link for each series in my chart (I am using 

ChartFX for .NET 6.2), and

I am doing the following:

chart1.Series.Item(0).Link.URL =

"javascript:window.open('http://www.yahoo.com')"

chart1.Series.Item(0).Link.Target = "_blank"

The new window opens up, but another window also opens with

"javascript:window.open('http://www.yahoo.com')" in the url (and it

says "[object]" on the page)....how do I prevent this window from

popping up (I also tried not setting the Target property, but then the

yahoo window opens up but the main page with the chart dissappears and

"[object]" shows up instead).

How do I prevent this from happening?

Also, why do you have to set security to full trust in order for links to

work in .NET mode for Charts in ASP.NET

Thanks,

Tejash

Link to comment
Share on other sites

Have you tried this?

chart1.Series.Item(0).Link.Url = "http:// ..."

chart1.Series.Item(0).Link.Target = "_blank"

You may also want to try "_new" as the target.

JC

Software FX Support

"Tejash Patel" <tjpatel403@gmail.com> wrote in message

news:SHfCoK7jFHA.888@webserver3.softwarefx.com...

>I am trying to set a javascript link for each series in my chart (I am

>using ChartFX for .NET 6.2), and

> I am doing the following:

>

> chart1.Series.Item(0).Link.URL =

> "javascript:window.open('http://www.yahoo.com')"

>

> chart1.Series.Item(0).Link.Target = "_blank"

>

> The new window opens up, but another window also opens with

> "javascript:window.open('http://www.yahoo.com')" in the url (and it

> says "[object]" on the page)....how do I prevent this window from

> popping up (I also tried not setting the Target property, but then the

> yahoo window opens up but the main page with the chart dissappears and

> "[object]" shows up instead).

>

> How do I prevent this from happening?

>

> Also, why do you have to set security to full trust in order for links to

> work in .NET mode for Charts in ASP.NET

>

> Thanks,

> Tejash

>

>

>

Link to comment
Share on other sites

I want to use a javascript link because I want to open a new window as a 

popup (I want to set the height and width of the window, and I dont want the

URL to show/be editable). It works when I use a regular link like you

suggested, but with the javascript, it pops up an additional window with the

javascript as the URL (and it says [object] on the page). I tried using

"_new" as the target, but the problem still occurs.

Are there any other suggestions (what are the different target options,

etc.).

Thanks,

Tejash

"Software FX Support" <none@noreply.com> wrote in message

news:zWfFy7KkFHA.888@webserver3.softwarefx.com...

> Have you tried this?

>

> chart1.Series.Item(0).Link.Url = "http:// ..."

> chart1.Series.Item(0).Link.Target = "_blank"

>

> You may also want to try "_new" as the target.

>

> JC

> Software FX Support

>

> "Tejash Patel" <tjpatel403@gmail.com> wrote in message

> news:SHfCoK7jFHA.888@webserver3.softwarefx.com...

>>I am trying to set a javascript link for each series in my chart (I am

>>using ChartFX for .NET 6.2), and

>> I am doing the following:

>>

>> chart1.Series.Item(0).Link.URL =

>> "javascript:window.open('http://www.yahoo.com')"

>>

>> chart1.Series.Item(0).Link.Target = "_blank"

>>

>> The new window opens up, but another window also opens with

>> "javascript:window.open('http://www.yahoo.com')" in the url (and it

>> says "[object]" on the page)....how do I prevent this window from

>> popping up (I also tried not setting the Target property, but then the

>> yahoo window opens up but the main page with the chart dissappears and

>> "[object]" shows up instead).

>>

>> How do I prevent this from happening?

>>

>> Also, why do you have to set security to full trust in order for links to

>> work in .NET mode for Charts in ASP.NET

>>

>> Thanks,

>> Tejash

>>

>>

>>

>

>

Link to comment
Share on other sites

I tried _new, but the problem still occurs. I want to use a javascript link 

because i want to control the height/width of the pop up window, and i also

dont want the url to show/be editable.

Any other ideas?

Tejash

"Tejash Patel" <tjpatel403@gmail.com> wrote in message

news:SHfCoK7jFHA.888@webserver3.softwarefx.com...

>I am trying to set a javascript link for each series in my chart (I am

>using ChartFX for .NET 6.2), and

> I am doing the following:

>

> chart1.Series.Item(0).Link.URL =

> "javascript:window.open('http://www.yahoo.com')"

>

> chart1.Series.Item(0).Link.Target = "_blank"

>

> The new window opens up, but another window also opens with

> "javascript:window.open('http://www.yahoo.com')" in the url (and it

> says "[object]" on the page)....how do I prevent this window from

> popping up (I also tried not setting the Target property, but then the

> yahoo window opens up but the main page with the chart dissappears and

> "[object]" shows up instead).

>

> How do I prevent this from happening?

>

> Also, why do you have to set security to full trust in order for links to

> work in .NET mode for Charts in ASP.NET

>

> Thanks,

> Tejash

>

>

>

Link to comment
Share on other sites

The following worked for me:

- Do not assign anything to chart1.Series.Item(0).Link.Target

- Instead of invoking open directly from the Url, define a JavaScript

function that performs this action and set this as the Url, for example:

chart1.Series.Item(0).Link.URL =

"javascript:MyFunction('http://www.yahoo.com')"

--

Francisco Padron

www.chartfx.com

"Tejash Patel" <tjpatel403@gmail.com> wrote in message

news:E0tA3SNkFHA.888@webserver3.softwarefx.com...

>I want to use a javascript link because I want to open a new window as a

>popup (I want to set the height and width of the window, and I dont want

>the URL to show/be editable). It works when I use a regular link like you

>suggested, but with the javascript, it pops up an additional window with

>the javascript as the URL (and it says [object] on the page). I tried using

>"_new" as the target, but the problem still occurs.

>

> Are there any other suggestions (what are the different target options,

> etc.).

>

> Thanks,

> Tejash

>

>

> "Software FX Support" <none@noreply.com> wrote in message

> news:zWfFy7KkFHA.888@webserver3.softwarefx.com...

>> Have you tried this?

>>

>> chart1.Series.Item(0).Link.Url = "http:// ..."

>> chart1.Series.Item(0).Link.Target = "_blank"

>>

>> You may also want to try "_new" as the target.

>>

>> JC

>> Software FX Support

>>

>> "Tejash Patel" <tjpatel403@gmail.com> wrote in message

>> news:SHfCoK7jFHA.888@webserver3.softwarefx.com...

>>>I am trying to set a javascript link for each series in my chart (I am

>>>using ChartFX for .NET 6.2), and

>>> I am doing the following:

>>>

>>> chart1.Series.Item(0).Link.URL =

>>> "javascript:window.open('http://www.yahoo.com')"

>>>

>>> chart1.Series.Item(0).Link.Target = "_blank"

>>>

>>> The new window opens up, but another window also opens with

>>> "javascript:window.open('http://www.yahoo.com')" in the url (and it

>>> says "[object]" on the page)....how do I prevent this window from

>>> popping up (I also tried not setting the Target property, but then the

>>> yahoo window opens up but the main page with the chart dissappears and

>>> "[object]" shows up instead).

>>>

>>> How do I prevent this from happening?

>>>

>>> Also, why do you have to set security to full trust in order for links

>>> to work in .NET mode for Charts in ASP.NET

>>>

>>> Thanks,

>>> Tejash

>>>

>>>

>>>

>>

>>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...