Search Results

Search found 223 results on 9 pages for 'mootools'.

Page 6/9 | < Previous Page | 2 3 4 5 6 7 8 9  | Next Page >

  • How to execute "eval" without writing "eval" in JavaScript

    - by Infinity
    Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting eval'd, so we don't want it to get conservative because there's an eval statement in MooTools JSON.decode So basically the question is, is there any alternative (maybe creative) way of writing a expression that returns the eval function? I tried a few, but no dice: window['eval'](stuff); window['e'+'val'](stuff); // stuff runs in the global scope, we need local scope this['eval'](stuff); // this.eval is not a function (new Function( "with(this) { return " + '(' + stuff + ')' + "}"))() // global scope again Any ideas? Thx

    Read the article

  • Javascript: Do processing when user has stopped typing

    - by Midhat
    I have a text box on a web page, whose value I want to send to a XMLHttpRequest. Now I want the user to just type the value, without pressing a button. But If i just send the request int he keyboard events, it will fire every time a key is pressed. So basically I want something liek this function KeyUpEvent() { if (user is still typing) return; else do processing } It would be great if the solution could come from plain javascript or mootools. I dont want to use any other library.

    Read the article

  • Equalize column javascript not working in Chrome

    - by alimango
    Hi, I'm using this mootools javascript snippet to equalize the height of my columns: window.addEvent('domready', function() { var columns = $$('.equalize'); var max_height = 0; columns.each(function(item) { max_height = Math.max(max_height, item.getSize().y); }); columns.setStyle('height', max_height); }); Problem is it's not working properly on Chrome. It's getting the minimum height of the 2 columns instead of getting the maximum. What seems to be the problem and how do I fix it? Thanks in advance!

    Read the article

  • Firefox redirect response on xhr request

    - by Bogdan Gusiev
    Suppose we have the xhr 'POST' request that returns 'redirect' status code. In that case browser is sending additional xhr 'GET' by the given URL. I am not sure who is doing that call chain: browser itself or js library(using MooTools). The problem is that the second 'GET' request is not recognized as xhr by the server: It doesn't have "X-Requested-With" header contains "XMLHttpRequest" The problem appears only on Firefox, but not on Webkit. So, believe it is not related to js library bug. Does anyone have ideas how to fix it?

    Read the article

  • Programmatically determine DPI via the browser?

    - by Brandon Pelfrey
    Hi all. I would like to programmaticaly determine the DPI of a user's display in order to show a web page at a precise number of units (centimeters/inches). I know it a weird request: it's for a visualization research project and it's kind of a control. We currently do it by having the user place a credit card to the screen and match a resizable div (via Mootools) to the real credit card, and voila we can get the DPI and display the page correctly. Can anyone think of a programmatic way to do this?

    Read the article

  • Implement keyboard control in JavaScript Grid

    - by Vanco
    I finished building a JavaScript grid control, end everything works fine. Paging, button navigation, column sorting, etc. The cells in the grid are DIVs which are generated using Mootools 1.2.4 (which is heavily used throughout the control). I want to implement keyboard control for the grid, both for paging (page up/page down) and for moving with arrow keys inside the rows/cells of the grid. I think that I have to attach an event handler on each cell of the grid and detect what key is being pressed in order to take an appropriate action. But, I can't set the focus on the cells. What am I missing? How do I do this? Any help is appreciated.

    Read the article

  • How to set html content in Moodialog

    - by Diego
    Hello, i've just downloaded Moodialog, a Mootools plugin for dialog, but i have a problem. If content is set via parameters it will be text and not html. Can you help me change the function to accept html? I suppose that this is the code to be edit. setContent: function(){ var content = Array.from(arguments); if (content.length == 1) content = content[0]; this.content.empty(); var type = typeOf(content); if (['string', 'number'].contains(type)) this.content.set('text', content); else this.content.adopt(content); return this; }, I tried to edit 'text' in 'html', but it will not work. Thanks for help (and sorry for my bad english).

    Read the article

  • How can I stop a default event when using a named function in addEvent?

    - by Rupert
    Normally, if I wish to stop a default event in mootools I can do this: $('form').addEvent('submit', function(e) { e.stop(); //Do stuff here } However, I don't like using an anonymous function in events because I often want to reuse the code. Lets say I have a validate function. I could do this: $('form').addEvent('submit', validate); which works fine until I want to stop the default event. validate obviously doesn't know what e is so I can't just do e.stop(). Also I've tried passing the event as a variable to validate but whenever I use a named function with parameters, the function gets called automatically on domready, rather than on the event firing. Even worse, an error is thrown when the event is fired: What am I doing wrong?

    Read the article

  • Highlight row of form when input is focussed

    - by Jeepstone
    I have the following piece of Mootools 1.11 code (not upgradable as this is within Joomla), which I want to highlight the form row, when an item within it is focussed. However, this doesn't work. I need to know how to access the parent div of the form item. window.addEvent('domready', function() { var list = $$('#ChronoContact_lensorder div.formrow'); list.each(function(element) { var fx = new Fx.Styles(element, {duration:200, wait:false}); element.addEvent('focus', function(){ fx.start({ 'background-color': '#e6f0f2', color: '#FFF' }); }); element.addEvent('focus', function(){ fx.start({ 'background-color': '#FFF', 'color': '#2F9AD0' }); }); }); }); HTML is: <div class="formrow"> <label for="ud">Uncut Diameter:</label> <input type="text" id="ud" name="ud" /> </div> Thanks

    Read the article

  • Wrapping an array of elements.

    - by fivetwentysix
    I'm trying to write an unobtrusive script and I don't want to add any html that's not needed unless javascript is enabled. Using MooTools 1.2.4, is it possible to wrap a an array of elements with say for example: tags? Desired effect: Before: <p>Something</p> <p>Something1</p> <p>Something2</p> <p>Something3</p> Wishful thinking javascript code: $$('p').wrapWith(new Element('div', {id: 'master'})); After: <div id="master"> <p>Something</p> <p>Something1</p> <p>Something2</p> <p>Something3</p> </div>

    Read the article

  • Creating a grid overlay over image.

    - by neteus
    Hi everybody, I made a script (using mootools library) that is supposed to overlay an image with a table grid and when each grid cell is clicked/dragged over its background color changes 'highlighting' the cell. Current code creates a table and positions it over the element (el, image in this case). Table was used since I am planning to add rectangle select tool later on, and it seemed easiest way to do it. <html> <head> <title></title> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size numcols = el.getSize().x/sz; numrows = el.getSize().y/sz; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </head> <body> <div id="imagetomapdiv"> <img id="imagetomap" src="1.png"> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> </body> </html> A 'working' example: http://72.14.186.218/~alex/motion.php There are two problems: while it works just fine in FF, IE and Chrome do not create the table if the page is refreshed. If you go back to directory root and click on the link to the file the grid table is displayed, if you hit 'refresh' button -- the script runs but the table is not injected. Secondly, although the table HTML is injected in IE, it does not display it. I tried adding nbsp's to make sure its not ignored -- to no avail. Any suggestions on improving code or help with the issues is appreciated. Thanks!

    Read the article

  • Streamlining my javascript with a function

    - by liz
    i have a series of select lists, that i am using to populate text boxes with ids. so you click a select option and another text box is filled with its id. with just one select/id pair this works fine, but i have multiples, and the only thing that changes is the id of the select and input.. in fact just the ending changes, the inputs all start with featredproductid and the select ids all start with recipesproduct and then both end with the category. i know that listing this over and over for each category is not the way to do it. i think i need to make an array of the categories var cats = ['olive oil', "grains", "pasta"] and then use a forEach function? maybe? here is the clunky code window.addEvent('domready', function() { $('recipesproductoliveoil').addEvent('change', function(e){ pidselected = this.options[this.selectedIndex].getProperty('value') ; $("featuredproductidoliveoil").setProperties({ value: pidselected}); ; }); $('recipesproductgrains').addEvent('change', function(e){ pidselected = this.options[this.selectedIndex].getProperty('value') ; $("featuredproductidgrains").setProperties({ value: pidselected}); ; }); $('recipesproductpasta').addEvent('change', function(e){ pidselected = this.options[this.selectedIndex].getProperty('value') ; $("featuredproductidpasta").setProperties({ value: pidselected}); ; }); $('recipesproductpantry').addEvent('change', function(e){ pidselected = this.options[this.selectedIndex].getProperty('value') ; $("featuredproductidpantry").setProperties({ value: pidselected}); ; }); }); keep in mind this is mootools 1.1 (no i cant update it sorry). i am sure this is kind of basic, something i seem to have wrapping my brain around. but i am quite sure doing it as above is not really good...

    Read the article

  • How do I stop events from bubbling/multiple events with animated mouseovers?

    - by Kurucu
    I noticed a lot of JQuery answers on this, but I'm using MooTools... I have a Table of Contents which uses CSS Fixed positioning to keep it off to the left side, except for 20 pixels. The user hovers their cursor over the 20 pixels, which fires the DIV's mouseover event and the ToC slides fully into the page. When the cursor leaves, the ToC slides back to where it was. $('frameworkBreakdown').addEvents({ 'mouseover': function(event){ event = new Event(event); $('frameworkBreakdown').tween('left', 20); event.stop; }, 'mouseout': function(event){ event = new Event(event); $('frameworkBreakdown').tween('left', (10 - $('frameworkBreakdown').getStyle('width').toInt()) ); event.stop; } }); This works well (aside from unrelated issues) except that when I move the mouse on the DIV it starts to jitter, presumably because the contents of the DIV are also firing the event, or the event refires as the mouse tracks over the DIV. How can I stop this behaviour from occuring? Is there a standard method, or do I use some sort of nast global variable that determines whether effects are in action, and thus ignore the event?

    Read the article

  • set the focus on the scroller when button is clicked

    - by liz
    hi i have a script <script type="text/javascript"> window.addEvent('domready', function(){ var totIncrement = 0; var increment = 560; var maxRightIncrement = increment*(-6); var fx = new Fx.Style('slider-list', 'margin-left', { duration: 1000, transition: Fx.Transitions.Back.easeInOut, wait: true }); //------------------------------------- // EVENTS for the button "previous" $('previous').addEvents({ 'click' : function(event){ if(totIncrement<0){ totIncrement = totIncrement+increment; fx.stop() fx.start(totIncrement); } } }); //------------------------------------- // EVENTS for the button "next" $('next').addEvents({ 'click' : function(event){ if(totIncrement>maxRightIncrement){ totIncrement = totIncrement-increment; fx.stop() fx.start(totIncrement); } } }) }); </script> in mootools v1.1 it makes a scroller function at the bottom of my html page. but when i click the next button the page's focus moves to the top of the page. how do i keep it on the scroller? this is the html fragment: <h3>Our Pastas</h3> <div id="slider-buttons"> <a href="#" id="previous">Previous</a> | <a href="#" id="next">Next</a&gt; </div> <div id="slider-stage"> <ul id="slider-list"> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini"><img src="xxx/images/stories/products/_thumb1/bucatini.gif"></a></div><h4><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini">Rustichella d'Abruzzo Bucatini</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata"><img src="xxx/images/stories/products/_thumb1/calamarata.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata">Rustichella d'Abruzzo Calamarata</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi"><img src="xxx/images/stories/products/_thumb1/cannolicchi.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi">Rustichella d'Abruzzo Cannolicchi</a></h4> </li> </ul></div>

    Read the article

  • Does Jquery and Mootools usually have conflict if both are used on a webpage? [migrated]

    - by Charming Prince
    I have this website am designing, i tried using mootools 1.31 to animate some of the div boxes when clicked or when the mouse hover rounds it, to shows the content. the thing is that it doesn't seem to work on the webpage, but if i try the same script on a blank webpage it works, am thinking probably it's because i have Jquery 1.52 on the same page and maybe both scripts are conflicting with each other because, if i remove the Jquery, the Mootools works. What should be my option, because i need the Jquery to do some validations for me, so i can't remove it completely. Here are the codes <script> //-vertical var mySlide = new Fx.Slide('test'); $('slidein').addEvent('click', function(e){ e = new Event(e); mySlide.slideIn(); e.stop(); }); $('slideout').addEvent('click', function(e){ e = new Event(e); mySlide.slideOut(); e.stop(); }); $('toggle').addEvent('click', function(e){ e = new Event(e); mySlide.toggle(); e.stop(); }); $('hide').addEvent('click', function(e){ e = new Event(e); mySlide.hide(); e.stop(); }); </script> here's the HTML <html> <h3 class="section">Fx.Slide Vertical</h3> <a id="slideout" href="#">slideout</a> | <a id="slidein" href="#">slidein</a> | <a id="toggle" href="#"> toggle</a> | <a id="hide" href="#">hide</a> <div id="test"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi nim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> Here's the CSS #test { background: #222; color: #fff; padding: 10px; margin: 20px; border: 10px solid pink; } #test2 { background: #222; color: #fff; padding: 10px; margin: 20px; border: 10px solid pink; } Am using the exact same code supplied by Mootools in their own example, if i do this on a blank webpage it works but incorporated into my own webpage, it doesn't, and my own page just have the script tag of the Jquery in the head section of the HTML.

    Read the article

  • MochaUI modal dialog form submit

    - by VP
    Hi, i'm playing with Motools + MochaUI and i'm facing a problem: I'm trying to submit a form from a modal window. It is working fine, the problem is that it is reloading the parent window. The code to my Modal: MUI.newPolicyWindow = function(){ new MUI.Modal({ id: 'modalNewPolicy', title: 'New Policy', contentURL: '/policies/new', type: 'modal', width: 340, height: 180, scrollbars: false }); } And my js to handle the action (the form's name is new_policy $('new_policy').addEvent('submit', function(e){ new Event(e).stop(); this.set('send', {onComplete: function(response) { MochaUI.notification('Policy created'); MUI.closeAll(); }}); this.send() }); Note that the form is submitted, the problem is that i would like that, on Success, it just close my Modal and send this Mocha's cute notification.

    Read the article

  • create a new option and inject into select box using mootools 1.2

    - by Avinash
    Hi i have one AJAX function which return the list of countries. It works fine. My problem is that want to load that countries in on select box which is already in HTML and is empty means no option value in it. I want to know that how can i create a new option element and inject into the select box using moo tools 1.2 I have used below code but its not working in IE. var NewOption = new Option("Select Sub Category",'0'); NewOption.inject($('nSub_nIndustryID')) Thanks Avinash

    Read the article

  • Compare only date javascript

    - by moleculezz
    Hi all, I can't seem to figure out what is wrong with my code. Maybe it would be simpler to just compare date and not time. Not sure how to do this either and I searched but couldn't find my exact problem. BTW, when I display the two dates in an alert, they show as exactly the same. My code: window.addEvent('domready', function() { var now = new Date(); var input = $('datum').getValue(); var dateArray = input.split('/'); var userMonth = parseInt(dateArray[1])-1; var userDate = new Date(); userDate.setFullYear(dateArray[2], userMonth, dateArray[0], now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds()); if(userDate > now) { alert(now+'\n'+userDate); } }); Perhaps there is a simpler way to compare dates and not including the time. Hope someone has an answer... Thanks!

    Read the article

  • Grid overlayed on image using javascript, need help getting grid coordinates.

    - by Alos
    Hi I am fairly new to javascript and could use some help, I am trying to overlay a grid on top of an image and then be able to have the user click on the grid and get the grid coordinate from the box that the user clicked. I have been working with the code from the following stackoverflow question: Creating a grid overlay over image. link text Here is the code that I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> </script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size //numcols = el.getSize().x/sz; //numrows = el.getSize().y/sz; numcols = 48; numrows = 32; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); var gridSize = { x: 48, y: 32 }; var img = document.getElementById('imagetomap'); img.onclick = function(e) { if (!e) e = window.event; alert(Math.floor(e.offsetX/ gridSize.x) + ', ' + Math.floor(e.offsetY / gridSize.y)); } </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> In this example the grid box changes color when the image is grid box is clicked, but I would like to be able to have the coordinates of the box. Any help would be great. Thank you

    Read the article

  • Problem with access to control properties in Multibox

    - by greatromul
    I used multibox-component to create lightbox-similar div. But I faced problem. I placed textbox with id ‘tbx_position’ in that div. I entered some symbols in textbox and then tried to read value via javascript-function (it had to alert document.getElementById(‘tbx_position’).value). Every time that value was empty. There is example of it. Furthermore, if I place in the div asp:Button, server OnClick-eventhandler doesn’t catch fire. Is any idea, what’s reason? Thanks.

    Read the article

  • Accordion nonfunctional in Opera

    - by nona
    While working as expected in all other browsers, opera refuses to tween the height of content. oddly enough, as i sat annoyed rapidly clicking it over and over again, if it's closed, and you select some text, and keep clicking the same spot long enough, sometimes it pops open. lol. seriously. ahh, it seems to sometimes open the first time clicked after the page is loaded. wth? the javascript: window.addEvent('domready', function(){ var content_height = [];i=0; $$( '.bio_accordion' ).each(function(item){ i++; content_height.push(item.getElement('.moreInfo').offsetHeight); var thisSlider = new Fx.Slide( item.getElement( '.moreInfo' ), { mode: 'horizontal' } ); thisSlider.hide(); item.getElement('.moreInfo').set('tween').tween('height', '0px'); var morph = new Fx.Morph(item.getElement( '.divToggle' )); var selected = 0; item.getElement( '.divToggle' ).addEvents({ 'mouseenter': function(){ if(!selected) this.morph('.div_highlight'); }, 'mouseleave': function(){ if(!selected) { this.morph('.divToggle'); } }, 'click': function(){ if (!selected){ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; item.getElement('.moreInfo').set('tween', { duration: 1500, transition: Fx.Transitions.Bounce.easeOut }).tween('height', content_height[i]); selected = 1; thisSlider.slideIn(); } else{ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; thisSlider.slideOut(); item.getElement('.moreInfo').set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut }).tween('height', '0px'); selected = 0; } } }); } ); }); the html: <div class="bio_accordion"> <div class="divToggle">test<span class="symbol">-</span></div> <div class="moreInfo" style="margin-left:10px;"> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf </div> </div> the css: .bio_accordion { padding:0px; margin:0px; } .divToggle { cursor: pointer; color: #ffffff; background-color:#1089b5; padding: 8px; } .div_highlight { padding-left:30px; padding-right:30px; background-color:#096687; } .moreInfo { padding: 2px; padding-top:15px; padding-bottom:15px; overflow: hidden; } .symbol { float:right; }

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9  | Next Page >