SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JQuery validating

    Hello.

    Does it possible to check data on another website with JQuery?
    (e.g. Comparing if data entered in search box , match data on another website )

    It could be done , with cURL (data downloaded then do some aactions on it) , but I saw some pages , where it was done much faster than cURL.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,799
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    JQuery is written in JavaScript and like all JavaScript only has access to information that is on the same domain as the script is on. The only way you could access another domain using any form of JavaScript (including JQuery) is to do an Ajax call to the server and have a server side script retrieve the data from the other site and pass it back to the current page. This might still use cURL but would appear to be faster because you are only reloading part of the web page and not the entire page.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ye , that's exactly what I am needing.

    Could you give some example , sample code?


Bookmarks

Posting Permissions

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