var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
I have been googleing all weekend for an answer to this but as yet I have not found one.
Is there any way of getting the value of an input box in the query string?
At the moment I am using:
But this adds the value of the input box on page load.
document.write("<a href='page.htm?quantity=" + document.checkout.inputname.value + "'>Add</a>");
I really dont want to have to use AJAX as it is only for 4 links so using AJAX as a little over the top.
You need a dynamic method that will either change the link or go to the page when something is entered in the form field. try this:
<form action="#" name="checkout">
Quantity: <input type="text" name="inputname" value="" >
alert("Enter a quantity");}}
You could also try this:
<a href="" name="QTY" onClick="this.href='page.htm?quantity='+document.checkout.inputname.value">Add</a>
I didn't test it so I'm not sure if it works.
Many thanks for your replies. I have just tested your first answer and have found that to be perfect.
I was almost there yesterday morning but thought I was going down the wrong route so scraped the code and started again.
Many thanks for your help.