Results 1 to 4 of 4

Thread: Asp-question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    84

    Asp-question

    Can this line be written in JavaScript

    var1=request.form("text1")
    or this:
    var1=request.querystring("text1") ??

    --------
    -Abel-
    --------

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Not to my knowledge. You could use ASP to generate the javascript on your results page : -


    <script language="javascript" type="text/javascript">
    var formvalue=""

    function displayDetails(){
    <%
    response.write "formvalue='" & response.write (request.form("text1")) & "';"
    %>
    alert (formvalue);
    }
    </script>
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    Are u trying to code in javascript - then the ans. is: Yes it is possible.

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Yes, it is possible. I just assumed that was after a form submit.

    You can use the DOM to get info from a form

    <script language="javascript">
    function popupValue(){
    alert (document.form1.text1.value);
    }
    </script>

    <form name="form1">
    <input type="text" name="text1"><br>
    <input type="button" onclick="popupValue()">
    </form>


    Or if the item isnt in a form : -

    <script language="javascript">
    function popupValue(objectID){
    alert (document.all(objectID).value);
    }
    </script>

    <input type="text" id="text1"><br>
    <input type="button" onclick="popupValue(text1)">
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

Posting Permissions

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



Click Here to Expand Forum to Full Width