Jump to content
Sign in to follow this  
prichardson

Javascript issue encountered with IE

Recommended Posts

Hello,I've had a go at using this ajax/javascript code: http://people.cs.uchicago.edu/~meweltman/sliding_tabs.html It works well in Firefox but not in IE.It gives this error: "Could not get the StyleFloat property".I have had a look into it and found this article good as i think it maybe the answer to the IE problem: http://radio.javaranch.com/gthought/2007/0...9239538983.html " element.style.styleFloat "However I am not sure how to implement it in the code. (The js code is in the "source-code" tab in "http://people.cs.uchicago.edu/~meweltman/sliding_tabs.html ")My understanding is that the IE calls/uses the 'element.style.styleFloat' rather than 'element.style.cssFloat' but in the js code it does not have it, instead it has this:

...		$extend(this.options,options);		if(this.options.orientation=='horizontal'){			this.flow = 'left';			this.side = 'right';			this.dim = 'width';		}else{			this.flow = 'top';			this.side = 'bottom';			this.dim = 'height';		}		this.bodies = bodies;		this.tabs = tabs;		this.tabs.setStyles({			'position':'relative',			'float':this.flow		});...

Many thanks

Share this post


Link to post
Share on other sites

I see that those tabs are a MooTools plugin. Mootools allows you to use 'float' in the setStyles method and then handles it based on browser detection behind the scenes.Are you implementing this as a Mootools plugin or are you trying to port it yourself? Could you post some code.EDIT: Nevermind I see that it is actually broken in the example. Not sure what is going on there. Have you tried contacting the author?

Share this post


Link to post
Share on other sites

Hi, Cheers for your quick response.Yeah i tried contacting the author. No response yet.I looked on their forum - http://forum.mootools.net/viewtopic.php?pid=37793 and tried looking at their known bugs. I also looked up it in google too and thats where i found that help.That person saying that IE you have to code the text for style float in a particular way. It says like a do-able thing - just i know idea how to try to use it in MooTools code.Do you think it is possible to do it in Mootools code? Or would it be best to move on and find another piece of code? Any ideas or suggest some code that does the same thing?Cheers for your help.

Share this post


Link to post
Share on other sites

I haven't used Mootools in a while but I am surprised it is not handling it correctly. Give this a try.

this.tabs.setStyles({			'position':'relative',			'float':this.flow		});if(document.all) {	this.tabs.style.styleFloat = this.flow;}

Even if this works be sure to follow up with the author and in the Mootools forum. This is either a bug in the framework or the plugin.

Share this post


Link to post
Share on other sites

Thanks for the code. I tried replacing that bit of code with what you gave. But still get the error in IE.I was wondering if it or something in this bit of code could be adjusted?Or maybe i am running out of ideas to why this wont work in IE?

		if(this.options.orientation!='horizontal')			this.tab_overflow.setStyle('float','left');				this.bodies.each(function(el,i){			el.injectInside(this.tab_body_container);		}.bind(this));

Share this post


Link to post
Share on other sites

I think the author is going to have to help on this one. The plugin must have a bug.Have you gotten any response from them or the MT forums?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...