473,396 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

probleme dans le passage en parametre dans une fonction

function Main(param) {
alert("test "+param); <<<<<<<<<<< Ici tout se passe bien : le contenu de
param est bien affiché
fchaine=''
....
+'<div ><a href="#" onclick="javascript:return Suite('+param+');"><IMG
src="tg.gif" ></a></div>'
....
document.write(fchaine);
}

function Suite(param) {

alert("test "+formulaire); <<<<<<<<<<< Ici rien ne va plus il est ecrit:
test [objet]
return false;
}

je n'arrive pas a faire passer par parametre le contenu de param.
dans la fonction Main si je remplace Suite('+param+') par Suite('+40+')
alors tout se passe bien.
pour info le parametre param sera une chaire de caractere.

Si quelqu'un sait comment faire...

Merci pour votre aide.
Chris
Jul 23 '05 #1
3 2823
Chris wrote:
function Main(param) {
alert("test "+param); <<<<<<<<<<< Ici tout se passe bien : le contenu de
param est bien affiché
fchaine=''
...
+'<div ><a href="#" onclick="javascript:return Suite('+param+');"><IMG
src="tg.gif" ></a></div>'
+'<div ><a href="#" onclick="return Suite(param);">
<IMG src="tg.gif" ></a></div>'

Ca va?
Mick
document.write(fchaine);
}

function Suite(param) {

alert("test "+formulaire); <<<<<<<<<<< Ici rien ne va plus il est ecrit:
test [objet]
return false;
}

je n'arrive pas a faire passer par parametre le contenu de param.
dans la fonction Main si je remplace Suite('+param+') par Suite('+40+')
alors tout se passe bien.
pour info le parametre param sera une chaire de caractere.

Si quelqu'un sait comment faire...

Merci pour votre aide.
Chris

Jul 23 '05 #2
Oui ca va merci, et toi?

Oups I forget to write my post in english.
Thanks for your answer.

If I use your solution, when I click, it's blocked when I use my solution
it's not blocked but I don't transmit the parameter as explain in my main
post :'(( ..

<< Translation in english of my main post >>
Hi,

I do not success to pass by parameter the contents of "param".
in the function "Main" if I replace Suite('+param+') by Suite('+40+')
dans la fonction Main si je remplace Suite('+param+') par Suite('+40+')
then all is ok.
For info, the parameter "param" will be a string

Thanks for your help
Chris

Corresponding code:

function Main(param) {
alert("test "+param); <<<<<<<<<<< Ici tout se passe bien : le contenu de
param est bien affiché
fchaine=''
....
+'<div ><a href="#" onclick="javascript:return Suite('+param+');"><IMG
src="tg.gif" ></a></div>'
....
document.write(fchaine);
}
-----------------------
function Suite(param) {

alert("test "+formulaire); <<<<<<<<<<< Ici rien ne va plus il est ecrit:
test [objet]
return false;
}


Jul 23 '05 #3
Chris wrote:
Oui ca va merci, et toi?
.. For info, the parameter "param" will be a string
If "param" is a String object (not a javascript variable pointing to a
String)

+'<div ><a href="#" onclick="return Suite(\"param\");">
<IMG src="tg.gif" ></a></div>'

Mick
Thanks for your help
Chris

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: grigoo | last post by:
bonjour a tous je me presente a vous::: greg dit le grigoo sur le web ,,etudiant en bioinformatique a montreal et jusqu au cou dans notre language prefere....java. et biojava.. et je suis en un...
1
by: sysindex | last post by:
I need to write an algorithm to retrieve most relevant passage from a large body of text. The passage needs to relevant to the search term. Sort of like what Google displays on their search results...
2
by: Denis | last post by:
Bonjour, dans un script php je fais un odbc_exec($db_apisoft, $sql) la chaine sql est UPDATE client SET FacNom="BLOT JEAN-LOUI", FacAdr="CHANTEGREL", FacCp="24120", FacVille="PAZAYAC",...
2
by: Peter Knowfield | last post by:
Bonjour à tous, Je développe une base traitant des candidatures pour des jobs. J'ai créer des requetes me donnant des listings d'individus selon des critères, et je désire pouvoir accéder...
2
by: sdffsdf | last post by:
Bonjour, je ne comprends pas pourquoi mon code ne fonctionne pas quand j'essaies de recuperer le contenu d'un champ vide dans ma tables Access ... '=== Description de la table ID_Bloc ( INT...
1
by: Omega | last post by:
Bonjour, J'utilise la fonction AnimateWindow (une fonction de l'API user32.dll) et je ne comprend pas pourquoi l'animation marche bien, mais le fond de la fenetre reste sombre jusqu'a la fin de...
2
by: Guid | last post by:
Bonjour, je cherche a connaitre le code permettant d'activer le mode Help qui originalement s'active en cliquand sur le bouton '?' (pres de la croix pour quitter l'application). j'aurai besoin de...
0
by: Dubois | last post by:
Bonjour Lorsque je lance un export excel au travert d'une page en ASP.NET C#, cela fonctionne sur la machine de développement, par contre, sur le serveur de production j'ai l'erreur suivante : ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.