jordan443 Posted April 23, 2013 Share Posted April 23, 2013 I'm making a manga (Japanese comic) reading site and on the front page it shows the latest feed of new manga from another site using this code: http://pastebin.com/dsQzbJRX That works fine but now I want to somehow turn each link on the page into a POST form submit button that posts the name of the manga to '/description.php' Any ideas? Quote Link to comment Share on other sites More sharing options...
lemmin Posted April 23, 2013 Share Posted April 23, 2013 If you are just asking how to make an anchor link send POST data, you can't without using Javascript. You can either use AJAX or some workaround like this: <form method="POST" action="/description.php"> <input type="hidden" name="manga" value="value"/> <a href="anything" onclick="this.parentNode.submit();return false">link</a> </form> If you have a bunch of them it would probably be better to do something like this: <form id="theform" method="POST" action="/description.php"> <input type="hidden" name="manga" value="value"/> </form> <a href="anything" onclick="document.forms.theform.manga.value='something';document.forms.theform.submit();return false">link</a> <a href="anything" onclick="document.forms.theform.manga.value='somethingelse';document.forms.theform.submit();return false">link</a> You really should just use GET Quote Link to comment Share on other sites More sharing options...
Q695 Posted April 24, 2013 Share Posted April 24, 2013 Try applying a grid to an image. I did this as a basic HTML project years ago.  You can also use anchor name with an on mouse over to slide out a menu somewhere on the screen. Quote Link to comment Share on other sites More sharing options...
jordan443 Posted April 24, 2013 Author Share Posted April 24, 2013 How would I automatically make the value of each (different) link the same as the text in-between the <a> tags? Quote Link to comment Share on other sites More sharing options...
Q695 Posted April 24, 2013 Share Posted April 24, 2013 POF does it with: <div style="float:left;margin-bottom: 15px;padding-left:24px;"> <a href="javascript: B('http://pics.pof.com/dating/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg','')"> <img border="0" alt="" onmouseout="hidetrail();" onmouseover="showtrail('http://pics.plentyoffish.com/dating/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg',225);" src="http://pics.pof.com/thumbnails/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg"> </a> </div> It's similar to AngularJS Quote Link to comment Share on other sites More sharing options...
jordan443 Posted April 24, 2013 Author Share Posted April 24, 2013 Sorry I'm new to PHP i don't really understand??? Quote Link to comment Share on other sites More sharing options...
jordan443 Posted April 24, 2013 Author Share Posted April 24, 2013 Sorry I'm new to PHP i don't really understand??? 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.