javascript

Jquery load error in IE 6

Hi! I'm using this script to add a comment and to load the server response: $r=" $('#somestuff').hide(); $('.button').click(function() { // validate and process form // first hide any error messages $('#somestuff').fadeIn(5000); }); $('#subm').click(function() { // validate and process form ...

How to you render JS.ERB files that is in another controller?

Hi folks, i do not quite understand what is wrong with my code - it is even causing my server to hang up. What i need to do is for the controller to return a JS script that when executed, will append a rendered partial to my $(".reviews") # test.html.erb $.getScript("/test"); # controller wants.js do render :partial => "/shared/...

JavaScript load a page on button click

Hi, I am trying to do a very simple task here, I would like to be able to click a button on a page and have it take me to another page. I have tried window.location.href, and a bunch of other things and it does nothing. I have tried different platforms and different browsers, all with the same result. I know that it can call a functio...

Disabling tab focus on form elements

hello, I have several divs within the same form. What I am trying to do is to disable the tab key in one of the div in the form without disabling the tab in the other divs in the same form. Example: Form div1 - disable tab key div2 - tab key works div3 - tab key works ...

jQuery insertAfter doesn't work in some situations

I want to add a hidden input after some element. I am using this code: $("<input type="text">").insertAfter(".addProduct"); It doesn't work. But if I replace to it works. $("<span>ddd</span>").insertAfter(".addProduct"); It works. Help me. Thank you. ...

Problem in zooming using Raphaël

I am building an application using Raphaël. I have done my work on vectors, now what I want is this - that I want to zoom the vectors. I have implemented this code on it, but when I zoom out the element its coordinates also changes with it, which I don't want. Please help me out. Thanks in advance. Here is my code: var raphael=Rap...

How to make list in webOS look like Grid?

I tried 'float: left;', but when scrolling(slowly is clearer), only one list item scroll..but not numItem of one row..(But photos app built in palm pre ROM woks just fine) In one file: <div id="results-list" class='thumb-list' x-mojo-element="List"></div> In another: <ul>#{-listElements}</ul> In another: <li class='thumb-item'>...

updating value in html table via javascript

Hi is there any way to upadte cell value with no events (i dont want to use 'onClick' or others)? The scheme is: user is filling form value, then clicks 'ok', and then value should be showed in cell in html table ? thx in advance for all help ...

jquery get the parent of the parent

I'm trying to hide a layer but can't seem to figure out how to get this working here's what i'm trying if ($('#dgAvailable_ctl02_lblpricefrom > strong').text() == '£'){ $('#dgAvailable_ctl02_lblpricefrom').parent().parent().hide() } And my code is <div class="resultsitem" style="background-color: rgb(238, 229, 208);"> <div class...

jQuery.hover with AJAX not working properly

Hey guys, I am struggling with my jquery hover combined with $.post. My goal was to create a bunch of select buttons and if I hover it an image would change(a path to this image would load by $.post). The image would change to its default on mouseout. And if the select button is clicked it would change the image permanently. The i...

Ajax combobox not working in Internet Explorer 6

The dropdown menu are not populating via ajax in IE6. They are working fine every browser except IE6. My snippet of code can be found as follows: function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); alert('simple'+xmlHttp); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); ...

How to open a pop-up page and render a JSF Response ?

I am using JSF 1.2 without any component libs for a JSF Application. Consider a case where I have a JSF rendered page and on click of a link in that page,a pop-up page should open and show some details which are from the backing bean? What are the options? since the pop up page is just a look up (read only data) , I am thinking to use ja...

javascript length property

return 0['toString']['length']; why does it return 1 ...

Select Element Array and Then Give it Method

i have 6 element and i want to select the 5th element (with jQuery) $(".deskripsi")[2] then give it a method, but when i try it it give me error in console log $(".deskripsi")[2].innerHTML is not a function can somebody tell my how to select element array in jQuery and give it method. oke, may it's seems my question is still uncl...

What's the best way to check for the presence of a hash?

Right now I'm using if(window.location.hash != '') Is this foolproof? Or, is there a way to return a Boolean value instead? ...

Is there any way to prevent people from making my web game available offline?

It's not the type of game that really need a server to operate. I'm using javascript and html5 right now, and I cant think of a way to prevent the game from being rip off. Using obsfucator is useless, the game would still work offline. Implementing a validation scheme is not invincible either. Someone smart can just crack the script an...

Javscript draggable div does not trigger scroll

I have a simple Javascript drag function. You can see it here: http://jsfiddle.net/XpAyA/12/ The red #dragger div is draggable. It is nested in an overflow scroll div but it doesn't trigger a "scroll" when it gets over the limit. Probably due to the fact that it is positioned absolute. Is there a way yo fix this? Make the scroll happen...

jQuery wait for above code execution to complete

I've written some javascript using jQuery to replace any select lists with a div and ul alternative so that it will give me some more styling control and make the drop downs look the same cross browser. The below code works 99% for me but I have one issue. At the bottom of the code I have had to use .delay() to tell the code in a way to ...

Problem when I try to open file and write into it

Could somebody explain why the following simple script doesn't work in Firefox and how can I fix it? <script type="text/javascript"> var w = window.open("a.php"); w.document.write("hello"); </script> Thanks much ...

Opening a link from a Raphael node into a lightbox

I am using fancybox for my lightbox needs. I have a need to open a link from a raphael element (in this demo a circle). Normally you would create a link and style it like so: <a id="test" href="ajax.html">Click Me</a></li> <script type="text/javascript"> $(document).ready(function() { $('#test').fancybox({ 'width' ...