Javascript Tooltips, Popups, Captions - BoxOver  

Go Back   Javascript Tooltips, Popups, Captions - BoxOver > BoxOver > Bugs
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2006, 11:06 AM
David David is offline
Junior Member
 
Join Date: Mar 2006
Posts: 6
Default Patch for bug on some IE 5.0

Hello,

The tooltip does not work on some instances of IE5.0 and IE5.5 because the scripting engine does not understand the "non-greedy" operator in regular expressions. See the answer to the following post for more details on this : http://forum.mamboserver.com/showthread.php?t=7881

I have written the following patch to make the script work on all those instances of IE5 :

Change the 2 lines :
curNode.boHDR=getParam('(?:[^a-zA-Z]header|^header)',curNode.title);
curNode.boBDY=getParam('(?:[^a-zA-Z]body|^body)',curNode.title);

To :
curNode.boHDR=getParam('([^a-zA-Z]header|^header)',curNode.title);
curNode.boBDY=getParam('([^a-zA-Z]body|^body)',curNode.title);

It works here on IE5.0 and FF 1.0.7 ; but I haven't done comprehensive testing. Maybe some of the developers could tell us whether this patch has unwanted side effects ?

Thank you,
Anselm
Reply With Quote
  #2  
Old 03-03-2006, 11:31 AM
David David is offline
Junior Member
 
Join Date: Mar 2006
Posts: 6
Default

Sorry - you also need to change :

if(res)
return res[1].replace('[[','[').replace(']]',']');
else
return '';

To

if(res)
return res[2].replace('[[','[').replace(']]',']');
else
return '';

In function getParam.
Reply With Quote
  #3  
Old 04-16-2006, 02:13 PM
olly olly is offline
Administrator
 
Join Date: Jul 2005
Posts: 82
Default Thanks

Hi David,

Thanks for the updates. The ? here is not actually signifying a non greedy search - with regular expressions you can specify a non-capturing group. Thus when you take away the ? the group, which was previously not being captured, is now captured and you have to look at the second capture instead of the first, since the inside group is now causing a total of 2 captures. Either way I'm going to include this patch because IE 5.0 clearly doesn't understand non-capturing groups.

I really appreciate all the patches you have posted in this forum. I am in the process of updating the boxover script. Seeing as you take the effort to look into how everything works I'll go over my changes here.

I was noticing that often long pages taking a long time to load (and I'm in SA where connectivity is backwards at times, maybe you wouldn't notice this overseas) would not start displaying tooltips until the page had fully loaded - they would show the literal title contents before the page fully loaded.

Thus I have removed the scanDOM function and instead implemented a trigger based scanBO function. This way the boxover script does not need to be placed at the bottom of the page (there was a problem with this earlier because putting the script at the top of the page would trigger scanDOM function before the actual DOM has been constructed by the browser) and more importantly the page does not need to be fully loaded anymore. So I no longer parse the entire page to assign tooltips - rather tooltips are assigned to elements as they are encountered. There is also a variable storing tooltip status so elements don't need to be re-parsed to check for tooltips.

Anyhow I'm in the process of implementing the above changes.

Would be very interested to hear what you think.

Thanks for the interest you've expressed in this component!
__________________
Javascript tooltips / popups
Reply With Quote
  #4  
Old 04-16-2006, 02:28 PM
olly olly is offline
Administrator
 
Join Date: Jul 2005
Posts: 82
Default Another thing

Also with this regex the non-capturing group is only used for header and body parameters because there was an anomolous case I had to cater for. This was when you has cssheader before header in the title attribute and it's contents would get captured for the header first. Thus I introduced the (?:[^a-zA-Z]header|^header) so that it would not match cssheader for header. Thus the update you posted above would work fine for the header and body attributes but getparam would capture incorrectly for other tooltip attributes.

I have thus modified getparam as follows

Code:
function getParam(param,list) { var reg = new RegExp('([^a-zA-Z]' + param + '|^' + param + ')\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]'); var res = reg.exec(list); var returnvar; if(res) return res[2].replace('[[','[').replace(']]',']'); else return ''; }
This extends handling the anomolous case with header and body to all attributes across the board so that there will always be a 2nd group to capture.
__________________
Javascript tooltips / popups
Reply With Quote
  #6  
Old 09-12-2006, 03:06 AM
Irena23 Irena23 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 1
Post I would like to buy alpaca clothers, need help

I have alpaca sweater, I like it a lot, but it already enough old, so I'm looking for a new one.I have seen many places in Internet with alpaca clothers, but most often I'm not satisfied with the price of sweaters.I believe that $80-150 (or even more) for one sweater is too much.Finally I have found one place with cheap alpaca sweaters, they sell wholesale alpaca products.Well, I'm thinking to make "test purchase" with them, but before I would like to hear your opinion.Probably you had some experience with the question?Here is the placehttp://alpacaproductwholesale.com/
Reply With Quote
  #7  
Old 10-02-2006, 10:54 AM
Neznayka2007 Neznayka2007 is offline
Junior Member
 
Join Date: Oct 2006
Posts: 1
Post cholesterol diet

Most people do not know that they have high blood cholesterol levels, since there are no symptoms. Lowering your blood cholesterol numbers will reduce your risk for heart disease, heart attack, and is important for everyone, of any age, even if you do not have heart disease now. Best sites about cholesterol here:hdl cholesterol ldl cholesterol high ldl cholesterol level testing
Reply With Quote
  #8  
Old 10-03-2006, 10:25 PM
seababy seababy is offline
Junior Member
 
Join Date: Oct 2006
Posts: 1
Post what about manual?

I've found adobe photoshop offered for discount at http://www.software-cheap.net but they sell it without the box and manual. Just wanna know what's there so special in the manual taking in account that i'm already familiar with photoshop? they also offer other software for cheap and i'm planing to buy whatever i need.any idea?
Reply With Quote
  #9  
Old 07-26-2007, 05:57 PM
exsmoker exsmoker is offline
Junior Member
 
Join Date: Jul 2007
Posts: 1
Post Quit Smoking Help

Hello Everyone,
My wife was finally able to kick the habit before she got pregnant with our now first born beautiful baby gilr, so I tought I'll share the resource that she has used to help her quit the smoking habit with as many people as I can.
She was a heavy smoker for about ten years and just a couple of weeks after finding out about the program that I have researched online, she was able to quit smoking permanently and now can't stop telling people about how she had kicked the habit for good.
Anyway if you want to check it out, here is the site that my wife has used to help her quit smoking; http://endthehabitnow.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:40 PM.