johnyp Posted July 13, 2012 Share Posted July 13, 2012 Hello i have this code: <?php include "config.php"; ?> <?php foreach($_GET as $var => $value) { $out.= $var . '=' . $value . "&"; } $out = substr_replace($out,"",-1); $out = str_replace("(","[",$out); $out = str_replace(")","]",$out); $out = "http://server.softgr.com/scripts/mycarexpo/index.php?" . $out . "&submit1=1&first=1&p=advsearch"; //echo $out; ?> </br> <center> <a href="" name="bikes" onClick="sendSubmit('<?php echo($out); ?>')">Search...</a> </center and all i need is after creating the $out variable to auto call the function sendSubmit('<?php echo($out); ?>') that now is at the href. Is it possible? Thank you. Quote Link to comment Share on other sites More sharing options...
Jessica Posted July 13, 2012 Share Posted July 13, 2012 <script type="text/javascript"> sendSubmit('<?php echo($out); ?>'); </script> Quote Link to comment Share on other sites More sharing options...
johnyp Posted July 13, 2012 Author Share Posted July 13, 2012 Thank you jesirose very much. That was pretty simple... Maybe you know how to place two divs in same position so i can hide the one i want... Thank you Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted July 13, 2012 Share Posted July 13, 2012 You could use z-index and positioning, but if you're after hiding / showing elements you can use $('#id _of_element').hide(); $('#id_of_element').show(); // coupled with $('#id_of_clickable').on('click', function({ $('#id _of_element').toggle(); $('#id_of_element').toggle(); }); [/code] Quote Link to comment Share on other sites More sharing options...
johnyp Posted July 13, 2012 Author Share Posted July 13, 2012 Thank you very much all of you. 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.