04-18-06 05:47 AM
Hi Randel,
this code should not work with ASP.NET webforms as destination.
To disable the viewstate you need to inject client side code that removes
the __VIEWSTATE form field.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"Randel" <randel.mckee@okdhs.org> wrote in message
news:1144774355.039233.52230@i39g2000cwa.googlegroups.com...
> Hi Stefan,
> Before we installed MondoSearch, I built a simple user control that
> submitted the page to a web page outside of MCMS. Just a form submit
> (code below).
>
> ---start code--
> <script>
> <!--
> //This function is called on keypressup from the text input field.
> //If [ENTER] is detected, the go_search fucntion is called.
> function checkKey()
> {
> if (window.event.keyCode == 13)
> {
> go_search();
> }
> }
>
> //this function first calls the trim function to take off
> leading/trailing
> //spaces. If data is left in the text field, the form action is
> changed to
> //point to okdhs search and form is submitted.
> function go_search()
> {
> document.Form1.Query.value = Trim(document.Form1.Query.value);
> if (document.Form1.Query.value != "")
> {
> document.Form1.action='/en/search/searchOKDHS';
> document.Form1.submit();
> }
> }
> function Trim(TRIM_VALUE)
> {
> if(TRIM_VALUE.length < 1)
> {
> return "";
> }
> TRIM_VALUE = RTrim(TRIM_VALUE);
> TRIM_VALUE = LTrim(TRIM_VALUE);
> if(TRIM_VALUE=="")
> {
> return "";
> }
> else
> {
> return TRIM_VALUE;
> }
> } //End Function
>
> function RTrim(VALUE)
> {
> var w_space = String.fromCharCode(32);
> var v_length = VALUE.length;
> var strTemp = "";
> if(v_length < 0)
> {
> return "";
> }
> var iTemp = v_length -1;
>
> while(iTemp > -1)
> {
> if(VALUE.charAt(iTemp) == w_space)
> {
> }
> else
> {
> strTemp = VALUE.substring(0,iTemp +1);
> break;
> }
> iTemp = iTemp-1;
> } //End While
> return strTemp;
>
> } //End Function
>
> function LTrim(VALUE)
> {
> var w_space = String.fromCharCode(32);
> if(v_length < 1)
> {
> return "";
> }
> var v_length = VALUE.length;
> var strTemp = "";
>
> var iTemp = 0;
>
> while(iTemp < v_length)
> {
> if(VALUE.charAt(iTemp) == w_space)
> {
> }
> else
> {
> strTemp = VALUE.substring(iTemp,v_length);
> break;
> }
> iTemp = iTemp + 1;
> } //End While
> return strTemp;
> } //End Function
>
> // -->
> </script>
>
> <input type="text" name="Query" onkeyup="checkKey()" id="Query"
> size="11" alt="Type search information in this field." value=""
> style="WIDTH: 101px; HEIGHT: 20px">
> <input type="button" onclick="go_search()" value="Go" name="gotoform"
> alt="Click this button to perform the search function." style="WIDTH:
> 27px; HEIGHT: 20px">
> ----end code
>
> We're running 1.1. It sounds as if removing the viewstate variable
> might be a simpler solution. How do you accomplish this? Also, would
> this impact my other postings in some way?
>
> Which of the two would you recommend pursuing?
>
> thanks. Randy
>
[ Post a follow-up to this message ]
|