suppressing button values in querystring

Results 1 to 2 of 2

Thread: suppressing button values in querystring

  1. #1
    ib Guest

    Default suppressing button values in querystring

    Is it possible using the GET method to suppress button and image inputs from appearing in the querystring?<BR><BR>Thanks<BR><BR>Ian

  2. #2
    Join Date
    Dec 1969

    Default A couple of ways...

    (1) Don&#039;t use GET. Instead, build the querystring "by hand" using JS coding. Then just do <BR>&nbsp; &nbsp; location.href=&#039;xyz.asp?&#039; + yourBuiltUpQS;<BR><BR>(2) Don&#039;t give the button or image a NAME= attribute! Only named fields are sent in the querystring. <BR><BR>How, then do you *use* the fields in your JS coding? A couple of ways: <BR><BR>(A) If you use an onClick or other event, just do <BR>&nbsp; &nbsp; onClick="processButton(this);"<BR>and then the function called simply uses the given argument as the button.<BR><BR>(B) If desparate, use document.formName.elements[ 3 ] or whatever the appropriate number is to get to the needed form element.<BR><BR>(3) Use *two* forms. The button and image are in the form that isn&#039;t submitted. You JS code can easily "see" both forms (by name) and so you can still do anything useful you need to do.<BR><BR>**************<BR><BR>Okay, three ways.<BR><BR>Those are off the top of my head. If none of those suit, ask again. I betcha there are other ways!<BR><BR>(Yeah, I just thought of another, using a hidden frame. But it&#039;s uglier than those three.)<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts