Pop up with strange behaviour in Internet Explorer but not Firefox.

F

ft310

Use Internet Explorer go to http://rhodeisland-aa.org/tester/meetings/index.htm

On the left click "and go to meetings"

Click any address in the right hand 'location' column.

The entire page reloads in the frame. (Bad)

Perform the same test using Firefox

The entire page does not reload. (Good)

In both cases the disclaimer window appears and the application
continues. That is good, but the IE behaviour is not good.

I know I am doing something wrong -- please tell me.

Thank you.
 
N

noagbodjivictor

Ok. This is what you have to do. Put something in the href="";
otherwhise, IE will fill it for you to http://rhodeisland-aa.org/tester/meetings/,
which will cause the entire page to reload.

But. It seems like FF is replacing it with the current URL in the
address bar.

Put something like href="#".
 
L

Lee

(e-mail address removed) said:
Ok. This is what you have to do. Put something in the href="";
otherwhise, IE will fill it for you to
http://rhodeisland-aa.org/tester/meetings/,
which will cause the entire page to reload.

But. It seems like FF is replacing it with the current URL in the
address bar.

Put something like href="#".

More important is that the onclick handler return false, so the
browser doesn't try to follow the link.

<a href="#NoLuckIfScriptDisabled"
onclick="launch(610);return false">Sturdy Hospital Auditorium, 211 Park Street
02703</a>


--
 
F

ft310

(e-mail address removed) said:






More important is that the onclick handler return false, so the
browser doesn't try to follow the link.

<a href="#NoLuckIfScriptDisabled"
onclick="launch(610);return false">Sturdy Hospital Auditorium, 211 Park Street
02703</a>

--

Thank you - this is great.

Are you using some debugger to get this or is it just a superior
development of your craft?


Thanks

Frank Toohey
 
F

ft310

ft310 said the following on 5/29/2007 11:15 PM:






It is a superior development of the craft with some sorcery thrown in
for fun. It can be learned from the group FAQ and the archives though.
Personally, I don't care for the onclick="launch(160);return false", I
prefer onclick="return launch(160)" and let the launch function return
true or false. You can search the archives to find out why return
functionName is a better alternative.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

Randy Again thanks -- love your answer -- it you got it . . .

The hint about the return will be implemented immediately.
 
L

-Lost

Randy said:
It is a superior development of the craft with some sorcery thrown in
for fun. It can be learned from the group FAQ and the archives though.
Personally, I don't care for the onclick="launch(160);return false", I
prefer onclick="return launch(160)" and let the launch function return
true or false. You can search the archives to find out why return
functionName is a better alternative.

Could you perhaps provide a search string to that effect?

I tried "return functionName" just in case, and well, it was not
satisfactory to say the least.

I am quite happy to know that I already subscribed to this method of
coding though. Why it is necessarily better I do not know. I did it
because it just made sense to reduce clutter in your markup and two,
because, why not have the function do it for you?
 
L

-Lost

Randy said:
Randy Webb said the following on 5/30/2007 12:46 PM:

Firstly, sorry for the *extremely* delayed response. I forgot the name
of the thread and had a bit of a family issue so didn't check the groups
for several days.

Little did I know that so many new replies would appear and make me lose
my place.

I eventually searched for "return functionName." ;)

Anyway, in response, because I developed what I thought was a clear
understanding of better coding practices.

Ah, I never thought (or knew) about that.

Ah, OK. So by not firing the default link *and* your function does
nothing you realize it was the function itself that went afoul.

Never thought about that either.
I like replying to myself so much I had to do it again:

<a href="thisPageRequiresActiveX.html" onclick="return
doSomething()">Something useless as usual goes here</a>

function doSomething(){
if (window.activeX){
//do something insane with activeX
return false
}
return true
}

Oooo. Internet Explorer-only functions huh? Tsk tsk tsk.

Also, you did mean window.ActiveXObject right? Otherwise, I am lost.
(Get it, I am lost? Ha!)

Speaking of proper coding practices, which is better?:

function f1()
{
if (window.ActiveXObject)
{
// do ActiveX
return false; // don't follow link
}
return true;
}

function f2()
{
if (window.ActiveXObject)
{
// do ActiveX
return false; // don't follow link
}
else
{
return true;
}
}

I certainly like f1() better.
I should start taking sleeping pills again.

Would Mr. Webb like some of -Lost's Seroquel? I have 300mg tablets.
Unless you are my size, that will put you to sleep for nigh on 16 hours.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top