passing javascript to vbscript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Katya

    passing javascript to vbscript

    Why the following code doesn't work? What am I doing wrong?

    <input type="hidden" name="test"
    value="javascri pt:document.for m.fld_1.value">

    I want to pass this value to a hidden field in order to get it later
    using Request.Form("t est").

    Thank you!

  • kaeli

    #2
    Re: passing javascript to vbscript

    In article <1116512953.541 747.10220@z14g2 000cwz.googlegr oups.com>,
    losharik@gmail. com enlightened us with...[color=blue]
    > Why the following code doesn't work? What am I doing wrong?
    >[/color]

    Making up code that doesn't exist.
    [color=blue]
    > <input type="hidden" name="test"
    > value="javascri pt:document.for m.fld_1.value">
    >[/color]

    You can't do that.
    And you can't just make up syntax, either. :^)
    [color=blue]
    > I want to pass this value to a hidden field in order to get it later
    > using Request.Form("t est").[/color]

    Then modify the onchange of fld_1 to set it.
    You can't do what you're doing. Does not compute.

    Though why you need two fields with the same value when the form has to get
    submitted to the server to do Request.Form anyway, I have no idea.

    --
    --
    ~kaeli~
    With her marriage, she got a new name and a dress.



    Comment

    • Katya

      #3
      Re: passing javascript to vbscript

      This kind of rude reply actually helped me to solve the problem. Thank
      you very much!

      Comment

      • Tim Slattery

        #4
        Re: passing javascript to vbscript

        "Katya" <losharik@gmail .com> wrote:
        [color=blue]
        >Why the following code doesn't work? What am I doing wrong?
        >
        ><input type="hidden" name="test"
        >value="javascr ipt:document.fo rm.fld_1.value" >
        >
        >I want to pass this value to a hidden field in order to get it later
        >using Request.Form("t est").[/color]

        You can't use Javascript like that.

        You're trying to copy the value of one form element to another? Attach
        an onUpdate event handler to the first field. The function called by
        that handler should do the copy. That way, every time the first
        element changes, the new value show up in the second element.

        --
        Tim Slattery
        Slattery_T@bls. gov

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: passing javascript to vbscript

          Tim Slattery wrote:
          [color=blue]
          > You're trying to copy the value of one form element to another?
          > Attach an onUpdate event handler to the first field. [...][/color]

          There is no such thing as an onUpdate event handler, not even in the IE DOM
          (that would be `onupdate', if that). There are standards compliant onkeyup
          and onmouseup handlers, though, and one can call the other to keep behavior
          consistent.


          PointedEars

          Comment

          • Randy Webb

            #6
            Re: passing javascript to vbscript

            Thomas 'PointedEars' Lahn wrote:
            [color=blue]
            > Tim Slattery wrote:
            >
            >[color=green]
            >>You're trying to copy the value of one form element to another?
            >>Attach an onUpdate event handler to the first field. [...][/color]
            >
            >
            > There is no such thing as an onUpdate event handler, not even in the IE DOM
            > (that would be `onupdate', if that). There are standards compliant onkeyup
            > and onmouseup handlers, though, and one can call the other to keep behavior
            > consistent.[/color]

            Any documentation that says it would be onupdate instead of onUpdate? I
            am unaware of any browser that makes intrinsic event handlers case
            sensitive in the markup.

            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

            Comment

            Working...