Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You would need to show us your HTML for us to advise exactly.</p> <p>If it's an actual link, then you can programmatically set the <code>.href</code> property which determines what URL the link is set for.</p> <p>If it's a button that has code attached to it, then you can set a property that the click handler uses to determine what URL to go to.</p> <p>For example, if it's the button with click handler, you could have this normal code:</p> <pre><code>// default value for nextURL in your initialization code var nextURL = "singleSet.html"; // click handler for the button function handleClick() { window.location = nextURL; } </code></pre> <p>Then when you want to change the value, you just change the value of that variable</p> <pre><code>// change the value nextURL = "multiSet.html"; </code></pre> <p>You could also avoid using a global variable and use an attribute on the button itself, but I kept the above example as simple as possible.</p> <hr> <pre><code>&lt;input id="nextButton" type="button" value="Next" onClick="window.location='SampleInfo.html'"/&gt; </code></pre> <p>Add, an id to the button and then you can change its click handler to a different function like this:</p> <pre><code>document.getElementById("nextButton").onclick = function() { window.location = 'multiSet.html'; }; </code></pre> <hr> <p>A better way to do this is to put the destination for the button as an attribute on the button:</p> <pre><code>&lt;input id="nextButton" data-location="SampleInfo.html" type="button" value="Next" onClick="window.location=this.getAttribute('data-location');"/&gt; </code></pre> <p>And, then to change the destination for the button, you just change the attribute value on the button:</p> <pre><code>document.getElementById("nextButton").setAttribute("data-location", "multiSet.html"); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload