I have a form on my website where inputs are given by visitors. After submitting it, they get redirected to the URL generated by Javascript on base of their inputs.
Thus to illustrate: If they give Data1 and Data2 as input, they get redirected to www.example.com/ajaData1+Data2
Actually, I don't want to redirect them to any URL. I want that they get a href to see after they click on the submit button so that they can choose whether they want to go to that URL or not.
This one is my JavaScript
<script type="text/javascript">function goToPage(){
var date = $('input[name=date]:checked').val();
var time = $('input[name=time]:checked').val();
var subject = $('input[name=subject]:checked').val();
window.location.href ="http://bay02.calendar.live.com/calendar/calendar.aspx?rru=-"+date+"-"+time+"-"+subject+"-";}</script>
And this one is the html code that I want to modify. My question is how I can insert the output of the javascript into the href section of my HTML?
<div class="group submit">
<label class="empty"></label>
<div><input name="submit" type="submit" onclick="goToPaget()" value="Get your appointment!"/></div>
</div>
<div id="form-message" class="message hide">
Thank you for your request
<div id="output" class="message hide "></div>
<h4><a href="**SO HERE I WANT TO PUT THE OUTPUT OF THE JAVASCRIPT**" title="Add To Calender">Add To Calender</a></h4>
</div>
hrefattribute of the link tag?