jaykappy Posted March 19, 2013 Share Posted March 19, 2013 I am trying to capture a value from an input box and place it in the below statement....need some help <a href="/MainPage.php?value=" Class="linkclick"> <a href="/MainPage.php?value=<?php echo ('#searchvalue').val() ?>" Class="linkclick"> The ID of the Input is "searchvalue" Thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted March 19, 2013 Share Posted March 19, 2013 Uhm, are you trying to use JavaScript or PHP?? Quote Link to comment Share on other sites More sharing options...
jaykappy Posted March 19, 2013 Author Share Posted March 19, 2013 I am very confused.... as you can see...I am aware the statement above has php and JS in it.... I Have an input box and a link/button I want to click the button, grab the value in an input box, pass it to the php page, do a php query and populate a table in the page Like a search....looking on where to start...examples etc... Quote Link to comment Share on other sites More sharing options...
Jessica Posted March 19, 2013 Share Posted March 19, 2013 You'd need to use AJAX for that. Check out jQuery. Moving this to AJAX forum. Quote Link to comment Share on other sites More sharing options...
Solution fooDigi Posted March 19, 2013 Solution Share Posted March 19, 2013 assuming you are trying to use jquery and you have the libraries included already.... $(.linkclick).click(function(){ window.location.href = "/MainPage.php?value=" + $("#searchvalue").val(); }); <input type="text" id="searchvalue" /> <a href="javascript:;" Class="linkclick">click</a> Quote Link to comment Share on other sites More sharing options...
jaykappy Posted March 21, 2013 Author Share Posted March 21, 2013 Awesome....than you all very much for your help...very appreciated.... Quote Link to comment Share on other sites More sharing options...
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.