技术 - Web Design - SiteServer CMS 自定义表单脚本错误的解决方案

21
09 Feb.

SiteServer CMS 自定义表单脚本错误的解决方案

最后更新: 2009/02/28  |  评论: 0  |  关键词: 分站  脚本  自定义表单  

当分站使用二级域名时,SiteServer 产生的自定义脚本出现了一点小小的错误,从而导致表单无论如何也调用不出来。

解决办法:按默认的脚本重写,去掉错误部分

  1. function stl_input_redirect(selectedID)  
  2. {  
  3.     try 
  4.     {  
  5.         var pars = 'successTemplate=&failureTemplate=';  
  6.         var option = {  
  7.             method:'post',  
  8.             parameters: pars,  
  9.             evalScripts:true 
  10.         };  
  11.         new Ajax.Updater({ success: 'ajaxElement_1' }, '/ajaxProxy.aspx?charset=gb2312&url=http%3a//site.xiongdi.org/siteserver/inner/input/default.aspx%3fpublishmentSystemID%3d1%26inputID%3d'+%2b+selectedID+%2b+'%26ajaxDivID%3dajaxElement_1%26checkMethod%3d%26width%3d95%2525%26isCheckCode%3dTrue%26isQuickSubmit%3dFalse%26isChooseSubmit%3dFalse%26inputIDCollection%3d%26templateType%3dFileTemplate%26channelID%3d1%26contentID%3d0%26fileTemplateID%3d17', option);   
  12.     }catch(e){}  

请注意上面红色部分  +%2b+selectedID+%2b+

多了 +%2b

所以不论你怎么调用你的表单是不会显示的!

解决方法就是我们按这个脚本重造一个正确的

  1. function stl_input_redirect(selectedID)  
  2. {  
  3.     try 
  4.     {  
  5.         var pars = 'successTemplate=&failureTemplate=';  
  6.         var option = {  
  7.             method:'post',  
  8.             parameters: pars,  
  9.             evalScripts:true 
  10.         };  
  11.         new Ajax.Updater({ success: 'ajaxElement_1' }, '/ajaxProxy.aspx?charset=gb2312&url=http%3a//site.xiongdi.org/siteserver/inner/input/default.aspx%3fpublishmentSystemID%3d1%26inputID%3d'+selectedID+'%26ajaxDivID%3dajaxElement_1%26checkMethod%3d%26width%3d95%2525%26isCheckCode%3dTrue%26isQuickSubmit%3dFalse%26isChooseSubmit%3dFalse%26inputIDCollection%3d%26templateType%3dFileTemplate%26channelID%3d1%26contentID%3d0%26fileTemplateID%3d17', option);   
  12.     }catch(e){}  

· 本文由 木炭 发布在《激情燃烧的木炭》 上,原文地址为:http://www.woodcoal.cn/technology/web/2009221-4120-526.html(转载请保留本信息、全文内容和链接)

发表评论

已经有 0 位朋友发表了对《SiteServer CMS 自定义表单脚本错误的解决方案》的看法
 
登录名:  密码:   登录  注册
评论: 
User:
Contact:
验证码:  
  [Ctrl+Enter]

关于本文