Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to retrieve the data from web page

    Hello,

    I am having question on how to retrieve data from web page.

    There are 'Yes' , 'No' checkbox for different questions on the web page. There are around 50 such questions.

    I have to retreive the values submitted by the user by clicking on either Yes or No checkboxes. Then save this data on the server. I have to use Javascript for this.

    Since I am new to Javascript I am not getting idea how to implement it.

    Any help is very much appreciated. Please let me know at the earliest.

    Thanks

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,731
    Thanks
    202
    Thanked 2,508 Times in 2,486 Posts
    Quote Originally Posted by Ganesh81 View Post

    There are 'Yes' , 'No' checkbox for different questions on the web page. There are around 50 such questions.

    I am afraid that I don't really understand. If there are checkboxes for both Yes and No, what is to stop the user checking both boxes? Surely what you want is radio buttons?

    What if the user checks neither box, or selects neither radio button?


    Be aware that JavaScript is purely a client-side language, and unless used with an Ajax call has no capability to read from or write to a file (except a cookie), access a database or the client's operating system, or alter the default behaviour of the browser. In other words, you will need either a server-side language or Ajax to save the data.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Actually, Philip, I think your "unless used with an Ajax call..." is a tad misleading.

    It is *STILL* true that JavaScript alone can't do anything on the server. That AJAX call *MUST* call some server-side technology and both the effect and the requirement is no different than if you submit the <FORM> to a server-side processor.

    Unless the JS author has access to some server-side process that is designed to handle the form contents, AJAX won't help a bit. And, of course, it's actually much more complex to make an AJAX call and pass all the <FORM> contents than it is to simply submit to a PHP/JSP/ASP/ASP.NET page.

    I guess I'm saying don't encourage non-server-side coders into thinking AJAX is some magic bullet. It's usually just a way to make life even more complex for the coder.


  •  

    Posting Permissions

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