1

how can i send a string value to a sever with java script without submit method? i know i can use jquery or ajax but is there any other way to do that without any library? i searched in Google and i find some good links: How to send data to remote server using Javascript http://bytes.com/topic/html-css/answers/154271-post-data-server-javascript-client-side

but all of them said we should use jquery or ajax

Community
  • 1
  • 1
infinity
  • 71
  • 2
  • 9
  • Ajax is not a library, it's a technique and works in every browser. That said, depending on what kind of data you want to send and what you want to do with it, there are other ways. If you read the answers in the question you linked to properly, you will see that alternatives to Ajax are mentioned as well. – Felix Kling May 31 '12 at 10:19
  • You still could use ajax without jquery. – xdazz May 31 '12 at 10:20

2 Answers2

0

Yes, that what you have to do if you don't want to refresh the page. Although, you could find other framework rather than jQuery. That framework still use ajax technology inside.

Someth Victory
  • 4,492
  • 2
  • 23
  • 27
  • @infinity: Which browsers exactly? – Felix Kling May 31 '12 at 10:23
  • @infinity: IE6 definitely does Ajax. IE5 probably not. But given that IE6 is already ancient, you should certainly not worry about IE5. And I said, the question you linked already mentions alternatives, have you already tried them? – Felix Kling May 31 '12 at 10:29
0

AJAX isn't a library - it's built into Javascript, and is available on pretty much all browsers from even IE6 onwards.

You can find full tutorials and instruction here: https://www.w3schools.com/js/js_ajax_intro.asp

Death
  • 1,999
  • 12
  • 14