Hyperlink control, how to set parameters via code
- AlexStenAlexSten
- Posts: 31
- Joined: Fri Apr 07, 2017
hello,
I'd need to use a hyperlink control on a form and set the url (Href...) via javascript, based on the ID of the current item.
Can you help me to understand, how to modify the hyperlink control settings please?
thank you
I'd need to use a hyperlink control on a form and set the url (Href...) via javascript, based on the ID of the current item.
Can you help me to understand, how to modify the hyperlink control settings please?
thank you
ciao,
Ale Stendardo
Ale Stendardo
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, Alex!
You can use JQuery to change href attribute of the link control. Give the link a class and then use this code:
You can use JQuery to change href attribute of the link control. Give the link a class and then use this code:
Code: Select all
$(".myURL").attr("href", "http://www.website.com/");
Cheers
- AlexStenAlexSten
- Posts: 31
- Joined: Fri Apr 07, 2017
thanks a lot Nikita!
will try it immediately.
Cheers
will try it immediately.
Cheers
ciao,
Ale Stendardo
Ale Stendardo
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, Cloud.Ed!
Okay, great to hear that! Yes, it's a simple JQuery command to change target attribute and it should work rather straight-forward.
If you do encounter any issues in the future or have any questions - please, let us know.
Okay, great to hear that! Yes, it's a simple JQuery command to change target attribute and it should work rather straight-forward.
If you do encounter any issues in the future or have any questions - please, let us know.
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests