Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Goran 4 posts 24 karma points
    Sep 12, 2009 @ 14:20
    Goran
    0

    XSLTSearch : No submit on Enter key press in IE7

    Hello,

    as you can see from the title, XSLTSearch doesn't return results when you press Enter key in IE7 like when you click Search button. I do a javascript fix for this, but I'm wondering if  there is any other way to fix this.

    • Umbraco: v4.0.2.1
    • ASP.NET: v2.0
    • XSLTSearch: v2.8
    • Windows: XP SP3
    • IIS: v5

    Thnx ahead

  • Chris Koiak 700 posts 2626 karma points
    Sep 13, 2009 @ 10:10
    Chris Koiak
    0

    Hi,

    A couple of questions.

    1. Is the html valid html/xhtml?
    2. Is the input box surrounded with a single form with valid method and action attributes?

    If you have went down the single runat/server form then you will always require JS to submit form successfully.

    Cheers,

    Chris

  • Goran 4 posts 24 karma points
    Sep 13, 2009 @ 13:16
    Goran
    0

    Actually, it is a macro, created of the ASP.NET user control (with text box and search button), inserted in the template and surrounded with a form which doesn't have the action.
    I'm not sure what the action should like.

    I tried with an action="/search.aspx?search=", but in the HTML source action is always like action="/default.aspx?". Also I noticed that the form id is 'aspnetform' instead 'RunwayMasterForm'.

    Please advice

  • Chris Koiak 700 posts 2626 karma points
    Sep 13, 2009 @ 13:47
    Chris Koiak
    0

    Personally I'd not use this usercontrol. I'd write a macro that output the form via xslt. Although you will have implement your own input validation.

    Most ASP.NET form websites/apps just surround the full html with a runat server form. This sounds like the approach used here.

    My suggested approach creates much cleaner markup, removes the JS dependencies, is more inline with MVC, and generally makes the world a better place.

     

  • Goran 4 posts 24 karma points
    Sep 13, 2009 @ 15:15
    Goran
    0

     

    <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

    Thanks a lot Chris

    Your solution works fine.

    I created inputs in XSLT instead ASP.Net user control, surround it with a form which has action attribute set to action="/search.aspx" and it works just fine.

Please Sign in or register to post replies

Write your reply to:

Draft