php - how to add an anchor after page reload -


I have been asked before this question, and generally the answer shows that inside the #MyAnchor form tag, Slice into the action string in the final form ... But in this situation, in which case the action string is very complex, where in reality I will replace the anchor so that the page is reloaded to the same place where the field (and not at the top of the page)?

  & lt; Div class = "submit-form" & gt; & Lt ;? Php if (get_option ('cap_api_key')! = "") {? & Gt; & Lt ;? Php // newsletter signup if ($ _SESSION ['email_signup'] == "true") {resonance "Cadstro efterado. Confira seu email."; $ _SESSION ['email_signup'] = ""; } Otherwise ($ _SESSION ['email_signup'] == "bad email") {resonance "call e-mail address". ? & Gt; & Lt; Form method = "post" action = "& lt ;? php bloginfo ('template_directory') ;? & gt; / include /mailchimp.php? Api_key = & lt ;? php echo get_option ('cap_api_key') ;? & gt ; And; List_id = & lt ;? php echo get_option ('cap_list_id') ;? & gt; "& gt; & Lt; Fieldset & gt; & Lt; Label = "lb01" & gt; Particopy CSVB & lt; / Label & gt; & Lt; Div class = "inp02" & gt; Input value = "email address" id = "lb01" name = "email" type = "text" /> gt; & Lt; / Div & gt; & Lt; Input type = "submit" class = "btn-deposit" value = "submit" /> & Lt; / Fieldset & gt; & Lt; / Form & gt; & Lt ;? Php} and {? & Gt; & Lt; Form method = "post" action = "& lt ;? php bloginfo ('template_directory') ;? & gt; / include /mailchimp.php? Api_key = & lt ;? php echo get_option ('cap_api_key') ;? & gt ; And; List_id = & lt ;? php echo get_option ('cap_list_id') ;? & gt; "& gt; & Lt; An id = "anchor" name = "anchor" & gt; & Lt; / A & gt; & Lt; Fieldset & gt; & Lt; Label = "lb01" & gt; Particopy CSVB & lt; / Label & gt; & Lt; Div class = "inp02" & gt; Input value = "cadastre seu email" id = "lb01" name = "email" type = "text" /> gt; & Lt; / Div & gt; & Lt; Input type = "submit" class = "btn-deposit" value = "submit" /> & Lt; / Fieldset & gt; & Lt; / Form & gt; & Lt ;? Php}}? & Gt; & Lt; / Div & gt; & Lt ;! - presented form - & gt;  

You can add a id = "field" And the browser will refresh it in most cases, in the URL #field


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -