更改DNN形式进入正常的GET形式 [英] Change DNN Form into normal GET form

查看:184
本文介绍了更改DNN形式进入正常的GET形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些改变,以一个点净核弹的网站自定义皮肤。我发现标题到皮肤文件位于Default.aspx的这里

I'm working on making some changes to a Dot Net Nuke website with a customized skin. I found out that the header to the skins file was located in 'Default.aspx' here.

形式有一些非常奇怪的行为。我不得不禁止进入按钮,因为在窗体中pressing导致网页,进入/HOME.aspx,然而这一行动从未中的Default.aspx内指定。

The form has some very strange behavior. I have had to disable the enter button because pressing within the form causes the webpage to go to "/HOME.aspx" however that action is never specified within the Default.aspx.

在code如下。

    <dnn:Form id="Form" runat="server" ENCTYPE="multipart/form-data" >
    <asp:Label ID="SkinError" runat="server" CssClass="NormalRed" Visible="False"></asp:Label>
    <asp:PlaceHolder ID="SkinPlaceHolder" runat="server" />
    <input id="ScrollTop" runat="server" name="ScrollTop" type="hidden" />
    <input id="__dnnVariable" runat="server" name="__dnnVariable" type="hidden" />
</dnn:Form>

在浏览器中被处理后显示形式。

The form after being processed displays in the browser as.

<form name="Form" method="post" action="/HOME.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="Form" enctype="multipart/form-data">

我要什么code显示为根本。

What I want the code to display as is simply.

<form name="Form" method="get" action="/SearchResults.aspx"  id="Form">

我试图与HTML直接删除DNN code,但去掉DNN形式会导致网站崩溃。

I tried removing the dnn code with the html directly but removing the dnn form causes the website to crash.

修改

我试图做的可以在 http://www.ontariosheep.org
如果您发现preSS的按钮,搜索工作,但pressing进入导致页面刷新。

推荐答案

您可以使用JavaScript来做到这一点:

You can use some Javascript to do this:

jQuery('#SearchBox').keypress(function(e){
   if(e.which == 13){
       e.preventDefault();CallSearchPage('http://www.ontariosheep.org/SearchResults.aspx');
   }
});

您将需要把在脚本标记以及在一个jQuery文档准备区......像

You would need to put that in script tags and also in a jQuery document ready area... like

&LT;脚本&GT;
的jQuery(文件)。就绪(函数(){

// code以上此处

});
&LT; / SCRIPT&GT;

这篇关于更改DNN形式进入正常的GET形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆