HI! thanks, I saw that little one after I posted it. but there is still a
problem. and the other post answered that one.
Do you know of another way to do it. ( other than converting the string and
then back again )?
Thanks in advance :)
Paul
"Joe Fawcett" <joefawcett@newsgroups.nospam> wrote in message
news:uETXwC5jFHA.1044@tk2msftngp13.phx.gbl...[color=blue]
> "Paul" <paul.dallaire@sympatico.ca> wrote in message
> news:uLpEe.7414$Qi4.983731@news20.bellglobal.com.. .[color=green]
>> HI! I get an error with this code.
>>
>> <SCRIPT language="JavaScript">
>> If (ifp==""){
>> ifp="default.htm"}
>> //--></SCRIPT>
>>
>> Basicly I want my iframe to have a default page if the user enters in
>> directly. so I need a way doing this. so I check to see if the ifp value
>> is null and if so then assign it a value. is this correct?
>>
>>
>> Thanks in advance :)
>>
>> Paul[/color]
> As you don't state the error I may wrong but if, as I expect, it is
> "object expected" then it's because you have a capital "I" in "If" which
> should be lowercase:
>
> if (ifp == "")
> {
> ifp = "default.htm";
> }
>
> In general all JavaScript keywords start with lowercase letters, built-in
> objects such as "String" are one such exception, and usually if two or
> more words are concatenated all but the first have an uppercase first
> letter, e.g "toLowerCase". An exception to this are the operators such as
> "typeof".
> --
> As a side point, although in this instance the syntax is the same, Java
> and JavaScript are two different beasts and I suggest restricting your
> choice of groups to the relevant ones.
>
> Joe (MVP)
>
>
https://mvp.support.microsoft.com/pr...8-8741D22D17A5
>
>
>[/color]