javascript

Access control attribute in code

I gave a button an attribute called notetype. <asp:ImageButton ID="bttnSave" notetype="none" runat="server" ImageUrl="~/images/bttnSave.gif" onclick="bttnSave_Click" /> I have a function from a different button's click that sets that variable to some type. function addnotes(Type,IncId,Acc,Wit,Claim,Inj,Prop,Media) { var bttnopen...

jquery ajax response removes the + character

Update: It looks like the problem is when I'm reading the value from the html to begin with. This is the markup: <input name="someval" type="text" value="Receive (+ open)" /> I'm reading the value of someval like this and passing it to the ajax call: $.ajax({ data: 'someval=' + $("input[name=someval]").val(), ...

How do I run a function before each test when using qUnit?

What is the equivalent of nUnits [SetUp] attribute for qUnit? ...

embed javascript variable in asp.net control id

Hi, I'm working with a table of asp.net controls on client side. They are all named in the following fashion when they are created on server side: "txt_name_" + rowNum. I know I can access them by their id by using "<%=Control.ClientID%>". On client side I have access to current row num via a javascript variable. I'm wondering how I...

Do multiple flash movies on a web page download and run in parallel or in sequence

We have a flash website built using flex and CS3. Majority of the site has been done using flex. We have multiple flash movies on a page and we obviously have the page loading very slow. Now that we are looking into options for making the page fast, we are trying to understand whether we can run these flash movies in parallel ? Is there ...

JS and Prototype : mouseover influencing overlying element, why?

I try to create a mouseover Event on a div wich containt a link. When the mouse pass over the div the background is apply to all div correctly, but when the mouse is over the link the background get apply only to the link, why? The link IS in the div, so logically it should still call my event on the div. ----------------------------...

javascript function called is undefined while parts of the page are loading

I have an aspx page that includes a javascript file in the head tag. This page has a user control placed on it. The user control has a link with an inline javascript function that references an object that is defined in the javascript file loaded on aspx page. The application consists of a master page and a number of other aspx pages. T...

Escaping + character when read to passed as ajax data (to prevent concatenation)

I'm reading the value of an input text field and passing it to be used as ajax data The field value has a + <input name="someval" type="text" value="Receive (+ open)" /> and looks like when parsed with data, it parses the + as a jquery concatenation. data: 'someval=' + $("input[name=someval]").val(), This is the first time I notic...

Absolute path reference problem on virtual directory

My image path references (src='/images/image.jpg') inside my .js files are failing when there is a virtual directory as the virtual directory gets included to the path hierarchy I can deal with this on other areas of my application where I have server methods to give me the correct path info. What is a good way to deal with this for ....

How to push javascript value to server at postback?

Hi, I was just playing around with ckeditor and can't get the darn thing to work for me. I somehow need to "data bind" the text box just before or at the same time of post back. How do I do that? Loading the data is fine but when I click update I need to somehow retrieve the new value of the text box. It's not as easy as to call the cl...

Simulating a form POST to ASP.NET MVC with javascript

I've had problems trying to send JSON to ASP.NET MVC Controllers. I don't want to accept one string parameter on each controller method and deserialize manually. I have found that constructing a collection of post variables works reliably, but I don't have a generalized function to do so. I can write one myself if no one has done it a...

Find Text Between 2 Quotes with jQuery

ok, so I have this small block of text: function onfocus(event) { if ($(this).val() == "Some Arbitrary Text") {$(this).val("");} } Using jQuery or JavaScript, I would like to find teh "Arbitrary Text". This text block is constant, with the exception of the "Arbitrary Text". Ideally, I would like a way to parse it without using com...

unable to resize table beyond certain minimum width

Here is a demo page: http://bridgetandmisha.com/resize%5Fsizes.html# Why am i unable to resize one of the tables to be 400px using this code: $("#countProductSummaryDetailTable").width(400) Can someone tell me what html markup is preventing this? Also, i am able to resize another table on the page to 400px (but that is not what i n...

Ctrl+Enter jQuery in TEXTAREA

How do I trigger something when the cursor is within TEXTAREA and Ctrl+Enter is pressed? Using jQuery. Thanks ...

JQuery: How to round an integer up or down to the nearest 10

Hello all, My JS skills are not good enough to do the following task so I am calling on the community! I could learn to do this, but I need to get this task done quickly, so I appreciate any help. I would like to round a number passed by a user to the nearest 10. For example, if 7 is passed I should return 10, if 33 is passed I should ...

Javascript for vertical text scroll breaking page layout

Hi, My code was validating perfectly and looked great, until I added a vertical text scroller script to the left most floating div in a 3 column css layout. Adding the script causes content below the script to repeat - both text and backgrounds - in several modern browsers (IE 6.0 - 7.0 - 8.0, Opera 8 - 9- 10). Safari and Firefox are OK...

IE doesn't run Javascript when you click 'back' button

I've built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking checkout takes you to paypal. If you click back, in IE the setup scripts (like clear the zip field) aren't fired. They work in Safari & FF, but ...

Info window go gray in IE but not Chrome?

I built a mapping application at http://gisnet2.cstx.gov/gisweb/base/base.htm and when I click on and use the Identify tool, the results gray out after the second click, but only when I use an IE browser (7 or 8). Anybody know why IE would do this? The source code is really long, but you can find the questionable code in the doIdenti...

hints on coding a dynamic form for mysql query

I'm a beginner and trying to generate as much of my own code as possible without just constantly asking others to write it for me, so with regard to this question I'm looking for hints in the right direction, rather than outright working examples. You people are all very talented, but I learn best if I reason it out myself. Should I hit ...

How can I create a back button that takes you back to the page you came from?

I am trying to create a button that knows what page you came from and enters that value into the anchor tag. Does anyone know a solution using either jQuery or PHP or both? ...