Forum des Objets Communicants et Solutions pour les Libérer...


 
AccueilAccueil  GalerieGalerie  FAQFAQ  RechercherRechercher  S'enregistrerS'enregistrer  Connexion  

Partagez | 
 

 Using the API, but don't want to get the "success"

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Raoul DuBois
Lapin nain
Lapin nain


Nbr de messages : 6
Carottes : 4170

MessageSujet: Using the API, but don't want to get the "success"   Mar 18 Juil 2006 - 19:34

Hi all,

I've made a little text input box on my website that allows users to send messages to my bunny. It uses JavaScript to send the user to nabaztag.com/vl/FR/api.js?sn... etc etc.

The only problem is that, when they hit "send", the page loads up with the ugly page saying that the message was successfully sent.

Is there a way to hit the nabaztag link virtually? Is there a way to set things up so that the user clicks "send" and they can stay in my site? Or, so that they can go to a personal "success" message within my site?

Thanks for any help!
Revenir en haut Aller en bas
Tabatha
il est cap' !!!
avatar

Localisation : Plat Pays
Nabaztag : Tabatha (V1) & Traci (V2)
Nbr de messages : 3718
Carottes : 4404

MessageSujet: Re: Using the API, but don't want to get the "success"   Mer 19 Juil 2006 - 9:45

Do you have the possibility to create php pages?
Revenir en haut Aller en bas
Raoul DuBois
Lapin nain
Lapin nain


Nbr de messages : 6
Carottes : 4170

MessageSujet: Re: Using the API, but don't want to get the "success"   Jeu 20 Juil 2006 - 15:34

No, my server doesn't allow PHP, unfortunately.

I created the input form with a simple JavaScript that calls document.location after the user enters their text.

Is it possible to do this with JS or similar?
Revenir en haut Aller en bas
nabazland
Karotzeur taquin
avatar

Age : 50
Localisation : Rouen - France
Nabaztag : Caulfield (v2.1)
Nbr de messages : 9770
Carottes : 10768

MessageSujet: Re: Using the API, but don't want to get the "success"   Jeu 20 Juil 2006 - 16:19

You should search 'xmlhttprequest()' on Google...

- here for crossover plateform function : http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/

- you must send correct http headers to expect a response from the API :
"Content-Type: text/xml; charset=UTF-8"
"Accept-Language: fr-fr"

I never use xmlhttprequest() but i think the truth is there.

_____________________________


Revenir en haut Aller en bas
http://www.nabzone.com
Kayakbabe
Lapin nain
Lapin nain


Nbr de messages : 4
Carottes : 4133

MessageSujet: Re: Using the API, but don't want to get the "success"   Ven 28 Juil 2006 - 17:27

You could setup an iframe or a div in your html page where the script is.
Use css to turn display off to make it not show.
Then submit your form to the iframe... the iframe will load the results content... but you won't see it.

Look for info on javascript and frames... you might try google terms like "javascript form cross frame" or "javascript form cross iframe" or "javascript form cross div" or something like that.
Revenir en haut Aller en bas
Contenu sponsorisé




MessageSujet: Re: Using the API, but don't want to get the "success"   

Revenir en haut Aller en bas
 
Using the API, but don't want to get the "success"
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» "ciblé"?
» [Custom] "Classics"/MOTUC by Tokyonever.
» Objet(s) introuvable(s) du niveau "T'as saisi ?"
» [Software] Topic de discussion du jeu "Mission Von Nebula"
» Liste d'armée de tempête du chaos "armée du middenland&

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum des Objets Communicants et Solutions pour les Libérer... :: IV. I Don't Speak French! :: Archives :: API & Developments-
Sauter vers: