javascript

Best way to submit search criteria to the server with AJAX?

Hi. Please consider the following HTML: <input type='text' id='name'/> <option id='option'> <select value='1'>hi</select> <select value='2'>bye</select> </option> <input type='text' id='date'/> This is a very simple form used to get search criteria from a user. I need to submit this search criteria to the server with an AJAX call...

Website spontaneously freezes in Chrome - how to debug?

I build this http://ipl.janstudt.de/ website which is supposed to run on the iPad (it does) and in Google Chrome. In Chrome (on Win 7 64bit), after a seemingly random time of a few minutes, the browser freezes. Also, sometimes when I click the "Reload Page" button in Chrome while on this site, the Browser also freezes. In both cases, the...

page injected via jsquery/ajax does not show properly in any Chromium browser

as obviously the css related to the page being injected is not loaded by Chromium. However, it is working well in IE8/O 10.x/FF3.6x. Hence begs the question - my stupidity in html coding, Chromium bug or jquery bug? that is what I could think of. this is the page in question, eliminated all non-essential js http://logistik-experte.gmx...

what is wrong with this snippet

<?php } elseif($_SOMETHING == 1 && $_ANOTHER_THING == 2) { ?> <?php $_NAME = urlencode($_NAME); ?> <?php $_MGT_NAME = urlencode($_MGT_NAME); ?> </div> <?php } ?> I am getting this error expected ';' ...

AJAX SOAP request - Safari changing POST to OPTIONS

I'm trying to send a SOAP action from a js running on my local machine to another device on my network. I notice that Firefox is successful, but Safari changes the header to say OPTIONS instead of POST. Any ideas? ...

HTML Templates in Javascript? Without coding in the page?

I am a web guy doing mostly Perl server-side stuff, and I'm slowly coming to a few conclusions. It is far better to do most of your code via Javascript and toss data back and forth via AJAX than it is to hit submit and reload a mostly-identical page I like jQuery because I like CSS, and it's fun to chain together big long and scary-to...

Ideal RSSParser in js which shows images

Do you know any RSS parser in javascript language which also shows images? I used jFeed but I am not able to see images when I use jFeed. Could you please help me about this? I would be glad if you can provide me an RSSParser which shows images as well? Regards Altaico ...

Correct Usage of $.post in jQuery

I have a website built across a series of pages and scripts, and I'm trying to link them together using Ajax. I was told the easiest way to send back to the server was using jQuery, so I'm trying that out but I can't seem to get it to work. My three files are as follows, with the methods in question being the lines containing onclick() a...

how to keep my slider horizontally centered ?

hi, I have a recurrent design issue when I use sliders in my photo galleries. Let's say I'm using a slider such as < 1 / 14 > centered below the current image. I cannot use text-align:center because I'm using position:absolute to move it right below the image. (I usually use lightbox2 pluging and I need to move the components accordin...

onclick is still giving me problems

Been looking at this for a while and even posted another question and got half the answer but the error still persists expected ';' character 392 ...

Simple & small, pure javascript lightbox (dialog overlay) ?

Hello, Does anyone know of a small, limited functionality lightbox built with pure javascript? This is for an embeddable widget, thus the reason of not using jquery. All I really need is creating an overlay for a specific div or simply by passing some HTML. ...

converting a date from SQL Server to C# and then to javascript gives different results on US vs. London webserver

I have an asp.net mvc calendar application (using jquery ui datepicker) and i am running into a weird situation where when i test on a US webserver i see a certain date and when i test on a London web server i see a different date (the date before) Here are the details: I am storing a date in sql server as: 2010-09-16 00:00:00.000 ...

IE is randomly minimizing when a link is clicked

I have the bizarre problem. When I click on a link in IE7 the window minimizes. It seems to only be a subset of the links on the page. It also doesn't consistently happen with the same link and differs from computer to computer. example link text: <a hidefocus="on" href="#" tabindex="1"><span unselectable="on" id="extdd-102">Canadi...

How to find out what form I just submitted in jQuery?

Hi, I use the $.post function to submit an ajax request as such: $('.typeAform').submit(function(){ $.post('/home', { somevar : 'somevalue' }, function(){ //do something with the original form }); return false; }); I'd like to identify my form after submission from the $.post callback so I can do something with it...

How to empty an javascript array?

var arr = [-3, -34, 1, 32, -100]; How can I remove all items and just leave an empty array? And is it a good idea to use this? arr = []; Thank you very much! ...

Cross-compiling Flex/Flash to Javascript

Are there any options for compiling Flex/Flash projects into Javascript/JQuery? I seem to remember this feature possibly being part of Adobe's latest dev tools? ...

javascript running locally but not on apache

I'm using JSValidate to validate a form, the form gets validated correctly when I access it via File-> Open File, but not when I type localhost/formname on my address bar. When ran from localhost/formname the form behaves as if the Javascript weren't there. This doesn't happen in my apache server at home, yet it does happen at work. Wh...

Limit Input text box with Jquery

So I need to have an input box in where people only is allowed to enter either the words "Yes" or "No". No other input is allowed. Does anybody out there knows a plugin or any other easy way to that with Jquery? I found a plugin named constraint (http://plugins.jquery.com/project/constrain), that can prevent the user from typing certain ...

How to reverse the order in a FOR loop

I've a simple FOR statement like this: var num = 10, reverse = false; for(i=0;i<num;i++){ console.log(i); } when reverse is false I want it to return something like [0,1,2,3,4,5,6,7,8,9] but, when reverse is true, it should return [9,8,7,6,5,4,3,2,1,0] Which is the most efficient way to get this result, without checking eve...

Get all input fields inside div (without JS library)

What's the easiest way to get all input fields inside a div without using a javascript library like jQuery? Similar to this jQuery snippet: var inputs = $('#mydiv :input'); ...