⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how can we physically create files?



viran
  • profile picture
  • Member

Posted 27 January 2013 - 02:08 AM

in a add form , i want to add a API call, how can i do that?

if this is physically generates a file , simply i can edit that? any help on this?

goFrendiAsgard
  • profile picture
  • Member

Posted 27 January 2013 - 06:16 AM

Can you describe it more clearly?
What do you mean by API?

victor
  • profile picture
  • Member

Posted 27 January 2013 - 07:02 AM

Can you explain what do you want in more details?

viran
  • profile picture
  • Member

Posted 27 January 2013 - 11:20 AM

[quote name='goFrendiAsgard' timestamp='1359267372' post='5295']
Can you describe it more clearly?
What do you mean by API?
[/quote]
[quote name='victor' timestamp='1359270145' post='5297']
Can you explain what do you want in more details?
[/quote]



lets say ,

we have a form contains fields related to a domain , domain name , contact details , expiredy date , registered date etc.

in that form there is a button next to domain name field , after entring the domain name when we press that button , its gettting data from whois servers , and filling that form.

since this is dynemically creating the views i cannot do that thing.

davidoster
  • profile picture
  • Member

Posted 27 January 2013 - 11:48 AM

I suppose first of all you need to get the data from a whois server in a format you can manipulate, let's say json or xml.
Then you need to use javascript calls to fill dynamically via ajax the form.

All these can be wrapped when the user leaves the field or presses enter in the field via a callback function, e.g. http://www.grocerycr.../callback_field
If this is not they way you want it to work, again via javascript you need to create your own button and onclick event run one of the methods from your controller.

For your whois calls you can look here: http://www.domaintools.com/api/docs/

This might help you with the filling of the fields.
http://www.grocerycr...ropdown-change/

goFrendiAsgard
  • profile picture
  • Member

Posted 27 January 2013 - 12:12 PM

As [member=David Oster] said. AJAX might be your solution. As I see, http://www.domaintools.com/api/docs/ support JSON format which is very familiar to javascript.