dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Access Prototype form element value?

  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Access Prototype form element value?

    Hi there

    I am an Ajax Newbie :-) ...please can you help me with some basic stuff..
    I am using prototype.js
    How do I access the form element value in my script?
    (see below)

    Thank you.

    My Form Extract
    ----------------
    <select name="Select" id="Select" onChange="callAjax('do');">
    ...
    ..
    .

    My Ajax Functions
    ------------------
    //handle the Ajax response ...
    function handleResponse(transport)
    {
    $('hello').innerHTML = transport.responseText;
    }

    function callAjax(s)
    {
    var myAjax = new Ajax.Request('index/get-Data',
    {method: 'get', parameters: {state: s},
    onComplete: handleResponse});
    }

    My PHP Script
    -------------
    ????????????????????????????????? // how do I access the form element value
    $formValue = $_REQUEST['Select'];
    print $formValue;

  2. #2
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    document.getElementById('Select').value= ...
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

Similar Threads

  1. Replies: 2
    Last Post: 02-20-2003, 12:21 PM
  2. Access form connecting to access database
    By Jim in forum VB Classic
    Replies: 1
    Last Post: 05-01-2002, 02:19 PM
  3. Access 97 to 2000 Conversion Error
    By Michelle in forum VB Classic
    Replies: 8
    Last Post: 04-19-2002, 05:01 PM
  4. how to access correct record from separate form
    By Piercewe in forum VB Classic
    Replies: 1
    Last Post: 10-16-2001, 10:28 PM
  5. Data Form Wizard (ADO) and Access 9.0
    By Dennis in forum VB Classic
    Replies: 0
    Last Post: 03-16-2000, 03:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center