Jump to content
  • 0

Code for conditional URL, dependant on the value of a virtual field on a form


NickMartinCJS

Question

I am trying to have different URL's appear on a selection form, based on the value of a virtual field (text value, populated by a parameter). This is the code I was trying:

<script>
if (document.getElementById('cbParamVirtual1').value='1'){document.write('<a href="<a href="http://www.notexponent.com/DatabaseNM61272/SurgeryForm.html?ProcedureCodeClinicalUnits1=[@field:ProcedureCodeClinicalUnits]&IDProcedureCode1=[@field:ID]&ProcedureCodeDescription1=[@field:ProcedureCodeDescription]">Select</a>');}
<script>

Please help.

Nick

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...