vbscript checkbox problem

Results 1 to 2 of 2

Thread: vbscript checkbox problem

  1. #1
    Join Date
    Dec 1969

    Default vbscript checkbox problem

    Hi, I&#039;m trying to get the value of a checkbox in a form using vbscript on the same page. I do not want to submit the form, but instead want to do a "window.location.href?status=" + Status" and send data as a string.<BR><BR>Here is the form with the checkbox<BR>&#060;form name="test"&#062;<BR>&#060;input type="checkbox name="Status" value="Yes"&#062;<BR>&#060;/form&#062;<BR><BR>ok, so now here is my vbscript code to attempt to retrieve the value of the checkbox(whether or not it is checked)<BR><BR>&#060;SCRIPT LANGUAGE="VBScript"&#062;<BR>Function test_onSubmit<BR>&#039;I do this to cancel the form because for other reasons I do not want to submit the form.<BR>test_onSubmit = False<BR>Status = document.test.Status.Value<BR>Document.Write(Statu s)<BR>&#060;/SCRIPT&#062;<BR><BR><BR>Please help if anyone can, what am I doing wrong? Thanks in advance if anyone can help!!!<BR>-Nerus<BR>Here is the problem, no matter whether the checkbox is checked or not I always get Yes for a value. :(<BR><BR>Can someone please tell me why this is, if I submit the checkbox it doesn&#039;t do this, it is Yes only if checked<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: vbscript checkbox problem

    It’s hard to analyze your question without giving specific reasons of what you are doing. Why cant you just hard code in the checkbox or request the info from a form or database?<BR>derek<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