javascript

Post request issue

I want to make a post request and i do like this: function Xxx_Click() { var params = new Array(); var p1 = new Object(); p1.Name = "id"; p1.Value = 1; params.push(p1); post('<%=Url.Action("Act","Ctrl")%>', params); } function post(url, para...

Textbox with drop down list behaviour using CSS/JavaScript

I'm trying to create a uniform style for a small web form. The problem is that the dropdown list seems to be pretty impossible to style as needed - the browser scroll options etc coming from the OS seemingly. The solution I can see is to manipulate a combobox implementation so that I can use a text box, with the selections managed thr...

How to use jQuery to select XML nodes with unique text content?

Hi all - I'm attempting to pull a list of unique text entries from an XML document "the jQuery way" and am hitting a wall. From this XML: <items> <item> <categories> <cat>Category 1</cat> <cat>Category 2</cat> </categories> </item> <item> <categories> <cat>Category 2</cat> <cat>Category 3</c...

Raw javascript instead of jquery (example follows)

Hello, this is my first question here. I have the following jquery code: $(document).ready(function(){ $("a").click(function(){ $(this).parent("li").css({textDecoration: "line-through"}); return false; }); }); that works just fine. It strikes through the parent li of any clicked anchor (there are many anchor...

Css positioning problems.

I'm trying to make this jquery drop down bar be on top at all time. I'm running into trouble on a specific page that is using jquery innerfade here: http://ithacacigars.com/cigars.php For some reason is slips behind the images. <?php include('perch/runtime.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3...

Jquery Ajax callback

I've got an ajax call via jquery that executes without error until I get to the callback. The content returned looks like this: {"UPSELLABLE":true,"OFFERTEXT":"p47r.cfm"} Simply doing alert(upselldata); will alert the data above. But if I try access variable upselldata like a javascript object( I thought jquery did the eval work fo...

Regular Expressions to insert "\r" every n characters in a line and before a complete word (basically a wordwrap feature)

I'm new to JavaScript and regular expression. I'm trying to automatically format a text document to specific number of characters per line or put a "\r" before the word. This is functionally similar to Wordwrap found in numerous text editors. Eg. I want 10 characters per line Original:My name is Davey Blue. Modified:My name \ris Dave...

jQuery with Rails when deployed to multiple subURIs

Hey. So I have a Rails app that's getting deployed to a production machine that serves it via Apache/Passenger to two subURIs. /app /app_2 both the above subURIs are running the same codebase. It's just two symlinks to the public dir that are both pointed to via Passenger by: RailsBaseURI "/app" RailsBaseURI "/app_2" Now, imma big ...

Error Message When Web Browser Don't Have Support Of Scripting

I'm developing a site that I know because of the site theme that it will be accessed on mobile devices and Internet Explorer For Windows CE 1, 1,1 and 2 don't have support for the <script> tag(as you can see on this table). Then I want to build a way that when the user have a browser that don't have a browser with scripting support it wi...

Access dynamically named JavaScript Objects?

Hi, I have a JS Object: var testObj = new Object(); that has a property called volume1, so testObj.volume1 has a value. How would I go about accessing that property by using something along the lines of testObj.volume + "1" To give it more context, the object actually has more properties, like testObj.volume1, testObj.volume2 ...

whole word match in javascript

Hi all, I am using javascript in my webpage. I am trying to search a single whole word through textbox. Say I search: 'me' , I should find all the 'me' in the text, but not find 'memmm' per say. I am using javascript's search('my regex expression') to perform the current search (with no success). Thank you! Edit: After several propos...

Is Javascript causing my form to not echo selected once error reloads the page?

Hello, I am still new at PHP/Javascript/Ajax and am having a very hard time (been going on for weeks) trouble shooting this problem. My site has a registration to be a member page that requires all fields to be filled out. This is a website for the Cystic Fibrosis community, so there is a section on the form where you choose your relat...

Is this port of Prototype to JQuery correct?

We have code that will run if the user is idle for a certain amount of time. (doStuff resets a countdown) Existing code in Prototype: Event.observe(window, 'mousemove', function() { doStuff(); }); Event.observe(window, 'scroll', function() { doStuff(); }); Event.observe(window, 'click', function() { doStuff(); }); Event.observe(window...

Concurrent loading of .js files via https

We're looking at splitting our .js to be served from two domains with the intent that that would enable concurrent loading. Question: Can we a) use subdomains for that purpose and b) will that concurrent loading also hold true over https? For instance, we'd like to request two files as such: https://www.example.com/firstfile.js https...

JavaScript DEFLATE Implementation

Are there any open source DEFLATE encoder implementations for JavaScript? I need it to generate a binary format on the client-side that requires DEFLATE. ...

Do (javascript) cookies work when outside of a webserver context?

Say i have a file test.html that uses javascript cookies. (a) When i access the file like this: http://mydomain.com/test.html cookies work fine. (b) But if i just double click the file to directly open it in a browser (with a url like: file:///folder_path/test.html) then cookies do not work. Is this the way it should be or am i doing ...

How can I stop an IFrame reloading when I change it's position in the DOM?

Is there any way to stop an Iframe re-loading it's contents when I change it's position within the DOM? Simple example: <script type="text/javascript"> function moveiframe() { var dest = document.getElementById('newparent'); dest.appendChild(document.getElementById('googleframe')); } </script> <iframe src="http://www.google.com"...

Possible JavaScript framework version conflicts when using site-wide vs local page scripts.

I assume this would be an issue with any JavaScript framework. I use MooTools on allot of the pages on my site. On some pages the scripts are 2 years old. When a new page needs MooTools I usually download the latest version to avoid any possible hang-ups with past bugs and to make use of any new features. This has worked fine as my old...

Javascript top banner control

Possible Duplicates: How to show popup message like in stackoverflow Header message just like at Stack Overflow How to display a message on screen without refreshing like SO does? I'm looking for something like StackOverflow's banner that pops up (or rather drops down) from the top of the screen when you have a new alert. ...

How do I load Javascript from an external file?

What is the best way to load a common Javascript chunk of code from a file on a simple website? I need to add a script that tracks users for the Piwiki Open Source Analytics. I have hardly worked with Javascript, and just wanted to know what should I do? <!-- Piwik --> blah blah blah <!-- End Piwik Tag --> Basically, I don't want to h...