Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check for the parameter passed?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Client-side développement
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01329577
Message ID:
01329597
Vues:
11
>>Hi everybody,
>>
>>I have a JavaScript function I'd like to call either with one or two parameters. The second parameter is a character string.
>>
>>I'm wondering how can I check for the parameter being passed?
>>
>>For some reason, check if (MyParameter) produces an error "Object required". I got the same error trying
>>typeof MyParameter !="undefined".
>>
>>How can I test for the second parameter?
>>
>>Thanks a lot in advance.
>
>I think this should work:
>
>
>function Sample(param)
>{
>   if (param == undefined)
>      alert('No parameter.');
>   else
>      alert('Parameter passed: ' + param);
>}
>
undefined without quotes, right? Let me try this syntax now.

I also have another question and my research on the web so far showed it's some IE settings. We're opening a window with window.open method and it displays long URL at the top. I would prefer to be able to display my own title instead. Do you know if this is possible at all?

Thanks again and let me try your idea.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform