Button markup code not working

Although I included this question in may last posting I thought it is probably better to have a separate thread in order that you can track it - question is as follows:

I have a button user control configured on my page which is supposed to load another page - markup is

<!--
<button onClick="location.href='http://localhost/formulatornet/forms/..." "style='width:250px;height:20px;background-color:#F1F8F5;text-align:left;font-family:arial;color:black;font-size:12px;font-weight:bold'" >Change Info</button>
-->
(without the comment tags)

but this merely refreshes the current page - if I include an external link using the same address i.e. 'http://localhost/formulatornet/forms/...' this works fine! Any ideas?

Thanks,

David
1 person has
this question
+1
Reply
  • Try

    <!--
    <button onClick="location.href='http://localhost/.../Change_Company_D... false;" .... >Change Info</button>
    -->

    Expression "return false" will prevent the form from being submitted.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Thanks for this but I think you've misunderstood my problem.
    I am trying to configure a button on my Home Page to load (preferably in a new window) another page which contains a form to capture certain user inputs and which I wish the user to hit (on that new page) another button - this one submits the form - and then return to my original Home Page.

    When I configure the button on my Home Page using your suggestion of including ';return false' in the location.href clause this still has the same effect i.e. my Home Page remains visible, I get a 'waiting for localhost' message in the bottom left corner and then my Home Page refreshes - all without revealing the required new page.

    If I configure the exact same process as an external link rather than a button it works except it replaces my Home Page rather than my desired effect of a new window - however the form opens for input rather than as in the case of the button it does not.

    Any further suggestions would be most welcome.

    David
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited