Results 1 to 10 of 10

Thread: help how to manipulate data using javascript

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    help how to manipulate data using javascript

    hi, I am new to javascript. I have just begun learning javascript in on some websites but I dont see answers for my questions about inserting, updating, deleting and selecting record using javascript and mysql.

    there is this php and mysql where php can manipulate data from mysql database records.

    but I would like to learn javascript manipulating records of mysql directly or thru php, like how to execute php using javascript to manipulate mysql records.

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: help how to manipulate data using javascript

    You can't use Javascript to access a database! Javascript is client-side whilst the database is on the server.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    Re: help how to manipulate data using javascript

    Nightwalker83, what I what to achieve is onclick of the button, I will call php that will manipulate the database record. Cant it be done?

    If not, what alternative can I use?

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: help how to manipulate data using javascript

    Why do you want to use javascript since the user can disable it?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    Re: help how to manipulate data using javascript

    It was just my choice to use javascript. But I would like to know what you can advice me how to achieve what I want to do.

    what I what to achieve is when I click a button, I will call php function that will manipulate the database record.

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: help how to manipulate data using javascript

    you don't need javascript to call php, just use the 'Action' attribute of the form and set its appropriate method.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    May 2013
    Posts
    1,126

    Re: help how to manipulate data using javascript

    dee-u, i dont want to use form but button element. can you possibly give me example.

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: help how to manipulate data using javascript

    Quote Originally Posted by codesearcher View Post
    dee-u, i dont want to use form but button element. can you possibly give me example.
    What do you mean by "manipulate data"?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: help how to manipulate data using javascript

    Quote Originally Posted by codesearcher View Post
    dee-u, i dont want to use form but button element. can you possibly give me example.
    Where will you get the data if you are not going to use a form? Your form should contain the Submit button that you can use to post those data and save them using php.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  10. #10
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: help how to manipulate data using javascript

    In todays day in age, there is absolutely nothing wrong with having a form save via an ajax call to a backend script. However, with something as mission critical as a save function, you should also allow for degradation by allowing the user to submit the form without javascript if it becomes disabled.

    Also make sure that your javascript isn't the only thing validating your data -- always validate a second time on the server.

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