javascript

HTML jquery response is cached on IE

Well I have a very rough version of gomoku working now. I'm using Jquery, Php and mysql database. When a user clicks on a board square a piece is placed. An ajax refresh determines if turn count has been incremented and updates the board's html if necessary. The problem is that Internet Explore (6,8,&probably 7) caches the page on the...

'Unexpected' behaviour when calling ColdFusion code (server-side code) from javascript event handlers

I have a simple YUI dialog with 2 buttons - Accept and Decline. I would like to call ColdFusion code together with JavaScript code when each of the buttons is clicked. When I introduce CF code together with JS code unfortunately both CF code present in each of the functions get triggered. All the code is shown below: <script type="tex...

Injecting a string into a javascript on an asp.net mvc view

I have a view that contains a javascript function that i need to init/call when the page loads. The method is static but it needs to be called with some parameteres (a list of Id's) - this list is dynamic and varies by some querystring parameters (i can not generate the list clientside from the querystring). So i need to generate this l...

Consuming webservices in Javascript.

I would like to consume my Axis2 webservice through a JavaScript client. ...

JavaScript callback urls in .js codebehind files in ASP.NET MVC

When we have a .js file which we reference from a View page and then have URLs in callback in JS file we run into problems with urls not being resolved when running site either on VS 2008 integrated webserver or on IIS7. For example, we have this piece of code in JS file pending.createCallback(pending.webRoot + "../../WidgetZone...

How can I make this code work in IE?

Hi, There are many tables in my HTML page. When a user hovers on a table, it should be automatically selected(onmouseover event) so that the user can copy(Ctrl+v) it to clipboard. I searched for a way in stackoverflow and ended up with the following code. But it only works in Firefox (window.getSelection() doesn't work in IE). How can I...

How do I dynamically check an object for a subobject/property in javascript/jquery

I am using the following code to build object for posting via ajax: eval('var prop = { ' + input.attr('name') + ': inputVal };'); paramsObj = $.extend(paramsObj, prop); Unfortunately I am having a little trouble when parsing my form when it comes to radios/checkboxes as I need to concatinate the values into a single param. How can I ...

How to convert a JavaScript array of doubles to a .NET array of doubles?

What is the best way to convert a JavaScript array of doubles return [2.145, 1.111, 7.893]; into a .NET array of doubles, when the Javascript array is returned from a webbrowser controls document object object o = Document.InvokeScript("getMapPanelRegion"); without using strings and parsing? The object returned is of type __ComObj...

How to overlay a small page on a html page?

Hi, I have a webpage underconstruction. I want to notify the people who visit it about its under-construction nature. For that I wanted to show a small transparent or transluscent page on the above page as shown here http://img17.imageshack.us/i/normalpagewithasmallpag.png/ You may notice that i want that page to appear at the center ...

How to display a popup with data of a data point in Flot graph?

I got the Flot-created graph. What I wanted to acomplish is to get some kind of information when user moves the mouse over it - best would be to show the data (from x and y axis) in some kind of javascript popup. It's probably trivial question, but I can't figure it out... Right now my javascript looks like this: <script id="source...

Merging XPahResults from document.evaluate

Hello, I'm doing a bunch of document.evaluate then itering through each result with a for loop on result.snapshotLength. Since I do the same thing inside each loop ( a thisDiv.parentNode.removeChild ) i would like to do just one loop. I've read that : The fifth parameter can be used to merge the results of two XPath queries. ...

Javascript Stack Trace in IE (or maybe just a simple Javascript error)

I came across this method to produce a Javascript stack trace (to fix an IE specific bug): http://pastie.org/253058.txt which sounds really useful, but when I call it, the stack trace I get is for the code of the script itself?! Probably a simple for someone who knows javascipt, but I don't! Or if you can suggest a better way to get a ...

Loop through selected table rows with JavaScript

Hi, I have a table, containing a checkbox to select the whole row (or not). This selection is done through JavaScript (JQuery) by setting a class attribute on the row. function SelectRow(pRowID) { $("#"+pRowID).toggleClass("selected"); } Next step, I want to loop through all selected rows of the table (to extract data from it). A...

HTML Checkboxes in select list

I'm trying to build a checkbox list within a select list (like the one for countries here: link text) I'm using Asp.net MVC so it needs to be pure/html &| javascript/JQuery. Is this possable? Or is there already a prebuild one I could download load? Thanks Ripped HTML/CSS: <html xmlns="http://www.w3.org/1999/xhtml" > <head> <style ...

Restricting enter keypress event in an IFrame, does not work

I have an IFrame within my page and am using the designMode="on" on this iframe for a small-level rich text editing. My concern is that I need not allow the user to enter new lines in it - meaning, I want to restrict enter keys. I did it using the question posted here to listen to the keypress events. But in my keypress event, if I ret...

TinyMCE commands or object API?

The popular TinyMCE rich text editor has an API for interacting directly with various classes, and it has a command-based API based around the 'execCommand' and 'execInstanceCommand' methods. I notice that, in some cases, the one operation can be performed via either API; so which one should I prefer? ...

Check if HTML contains JavaScript in PHP

I need to check if user submitted HTML contains any javascript. Im using PHP for validation. Thanks for any help! ...

i have problem in javascript email validation

hi......, i have problem in javascript email validation, I wrote code something like, //emp.php <form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2" > <table> <tr valign="baseline"> <td nowrap="nowrap" align="right">Desired Email-ID:</td> <td><input type="text" name="emp_email" value="" si...

How to apply style to a confirm pop-up window

is it possible to give style to a confirm dialog box in javascript? i am using asp.net with c#. Eg:- OnClientClick='javascript:return confirm("Are you sure, Do you really want to delete this item ")' how to give style for this dialog box? ...

Buttons OnClick Event not firing when it causes a textboxes onChange event to fire first

I have a few textboxes and button to save their values on a webpage. The onchange event of the textboxes fires some js which adds the changed text to a js array. The ok button when clicked flushes this to the database via a webservice. This works fine except when the onchange event is caused by clicking the ok button. In this scenario th...