Hmm!
There have been a few posts on this topic (or related), including some I
have taken part in
One spelt out the different between:
a null string, tested by 'if (string == null)'
an empty string, tested by 'if (string == "")'
and
a string comprising a space, tested by 'if (string == " ")'
Your test is for an empty string. Is this what it should be?
You are testing if (ifp == ..). I have not used iframes, so I don't know
whether this is the correct thing to be testing. Others may answer this.
With frames, I use this code
if (parent.location.href == window.location.href)
parent.location.href = "index.html"
I would need to experiment to see what works with iframes. (Maybe I should,
to add to my knowledge !)
--
Cheers,
Trevor L.
Website:
http://tandcl.homemail.com.au
akarl wrote:
Paul wrote: 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?
comp.lang.javascript