Link in formular einblenden

Post Reply
msteiner
Posts: 167
Joined: 05. Aug 2015, 15:01
Contact:

Link in formular einblenden

Post by msteiner » 10. Aug 2016, 17:16

Hallo,
ICh habe ein Attribut gebaut (String)
in dieses kann ich meinen wert schreiben zB: Foto

jetzt hätte ich gerne im Formular einen Link angezeigt der sich zusammensetzt aus einer definierten URL (zB. http://www.google.de) und dem string

Ergebniss sollte also sein
http://www.google.de/Foto --> und das als LINK im Formular dargestellt

Im Formular kann ich jetzt mit "add Control" und im custom html control einen link mit

Code: Select all

 <a href="www.google.at">Google</a>
anzeigen lassen
aber einen bauen wie im WF über die assign funktion

Code: Select all

 "<a href="www.google.at""+ Attribut + ">Google</a>"
geht leider nciht - hat hier jemand eine idee?

lg M

Sven_Puth
Posts: 461
Joined: 07. Apr 2011, 15:55
Contact:

Re: Link in formular einblenden

Post by Sven_Puth » 11. Aug 2016, 08:34

Habe mal etwas sehr ähnliches gebaut. Im Formular verwende ich ein Control mit Link, der noch kein Ziel enthält:

Code: Select all

<Center><a id="downloadLink" href="#" onClick="getDownload()"><img id="dlimg" src="/SPS/Images/Icons/48x48/document_down.png"></img></a></Center>
Unter Skript habe ich dann eine JavaScript Funktion, die den eigentlichen Aufruf onClick ausführt:

Code: Select all

function getDownload()
{
var downloadLink = document.getElementById("downloadLink");
window.open(g_Ud_OnlineDocumentClassBase_DownloadURL);
}
Tria-media - IT Solutions

msteiner
Posts: 167
Joined: 05. Aug 2015, 15:01
Contact:

Re: Link in formular einblenden

Post by msteiner » 11. Aug 2016, 09:13

Code: Select all

<Center><a id="downloadLink" href="#" onClick="getDownload()">LINK TEXT</a></Center>
übersetzt soviel wie:
beim klicken führe das script mit der funktion "getDownload" aus
-->Richtig?

Code: Select all

function getDownload()   --> definition der funktion  "getDownload"
{
var downloadLink = document.getElementById("downloadLink");
window.open(g_Ud_OnlineDocumentClassBase_DownloadURL);  --> ist das "g_Ud_OnlineDocumentClassBase_DownloadURL" das Attribut in der DD?
}

Sven_Puth
Posts: 461
Joined: 07. Apr 2011, 15:55
Contact:

Re: Link in formular einblenden

Post by Sven_Puth » 12. Aug 2016, 08:22

Korrekt.

Die g_Attribut-Variablen kann man über das Konfigurationselement -> Ereignisse aktivieren. Dort sind alle Attribute aufgelistet. Wenn du eines davon anhakst wird eine entsprechende JavaScript-Variable im Dialog verfügbar
Tria-media - IT Solutions

msteiner
Posts: 167
Joined: 05. Aug 2015, 15:01
Contact:

Re: Link in formular einblenden - gelöst

Post by msteiner » 16. Aug 2016, 09:48

spitze die aktivierung hat mir gefehlt
DANKE

Post Reply

Return to “Customizing und Reporting”

Who is online

Users browsing this forum: Google [Bot] and 5 guests