storing nfc tag in client pc webpage

hi.

i'm new to ruby on rails. at the moment i'm developing web app with acr122u and iso/iec 14443a card. i want client pc to open web page, swipe cards, lookup tags which is already in the database then bring back some data to the page. i'd already tried gem nfc or nfc-eventd, both of them can read tags continuously. but how do i pass the tag to a page or look it up in database?

thanks

I don't know about the tags but if you don't know how to look things up in a database then I suggest working right through a good rails tutorial such as railstutorial.org (which is free to use online) which will show you the basics of rails. Then when you have found how to work the card reader you will know how to deal with it in rails.

Colin

maybe its too wide.. let me simplify. i have a ruby script that reads NFC tags:

require 'nfc'

ctx = NFC::Context.new dev = ctx.open nil

loop do

p dev.pool.to_s

end

par example the output in the terminal is 'c2 f3 44 12'.

i also have a webform with a text field with label "id".

how do i pass the output to id.text_field? or... is it possible?

Are you asking how to run a ruby script from the web browser, where the script directly accesses hardware on the computer?

Colin

that's an alternative i thought before.. but yes.

Please quote the previous message when replying so that it is easier to follow the thread. Someone seeing your reply will not know what you it is that you are saying yes to. Thanks.

I believe it is normally not possible to access hardware from the browser. Would you want a web page you visit messing with the hardware on your PC.

One option for you is to write an app that runs on the PC that fetches the data and posts it to the rails server directly. There may be other alternatives.

I don't understand what you mean when you say "that's an alternative i thought before". Alternative to what?

Colin