javascript

How to get back text in html format by using something like URLDecode

I am passing value of text-area in a.cfm in variable of GetXmlHttpObject to b.cfm page and displaying the value in a . How can I get exact formatting of the text I entered in text-area of a.cfm page into div of b.cfm page. a.cfm <textarea name="sum1#i#" id="sum1#i#" html="yes" cols="98" rows="5"></textarea> [my text area] url=ur...

Why does this JavaScript not correctly update input values?

I have two input fields, and without changing their names (i.e., I have to use the name with the brackets), how do I make this javascript code work? <script> function calc_concreteprice(mainform) { var oprice; var ototal; oprice = (eval(mainform.['concrete[concrete][sqft]'].value) * eval(mainform.['concrete...

Javascript/CSS rollover menus are patented and subject to licensing?

Very interesting finding that a client brought to my attention today regarding javascript style rollover menus. They got a call from their legal dept that they need to change the manner in which their rollover menu is activated (at the risk of having to pay license to continue using the navigation technique). Its no April fools joke, app...

Using PHP retrieved variables in Javascript

Hi, I will use the following javascript to display a Google Map Window in a webpage. <script language = 'javascript'"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(35.904173, 14.433396), 16); map...

Javascript for disabling dropdown in ASP.NET

Hi Team, I am using JScript in ASP.NET 2005. I have a page with a checkbox and a dropdown list. When the checkbox is checked, the dropdown is to be disabled. During Postback of the page, this behavior should be retained. I am using a javascript function as follows if((chkOwner[1].checked==true)) { document.getElementById(ddlClient...

Adding a drop down menu with jquery

Hi everyone! Here's the situation I have a webpage which has one drop down called prefer. I wanted the user to be able to choose one option and then have a link next to it called "Add" which generates another textbox with the same options, i was going to use jquery to show an additional drop down. But if possible I wanted to put the se...

Remove "Flash" between pages while using Internet Explorer modal boxes

I have an internal web application, that is IE specific, and uses a lot of IE specific modal boxes: (window.showModalDialog). I recently received a request to remove the "flash" when navigating between pages of the site. To accomplish this, I just added a meta transition tag to my master page: <meta http-equiv="Page-Enter" content="ble...

how to construct a long string

I need to construct a long string with javascript. Thats how i tried to do it: var html = '<div style="balbalblaba">&nbsp;</div>'; for(i = 1; i <= 400; i++){ html+=html; }; When i execute that in firefox its taking ages or makes it crash. what is the best way to do that? What is generally the best way to construct big strings in JS...

window.focus is not working when we load PDF file

Hi, Window.focus is not working, when we load a PDF file in a popup window. EX. Say, we have 2 PDF links, 1st link is clicked, no issues, PDF file opened. Now, without closing the 1st window, i m trying to open the 2nd link...here comes the issue. PDF file is opened in that window, but its not getting the focus. Thanks ...

extract variables from an expression using javascript regexp

For example, here is a string representing an expression: var str = 'total = sum(price * qty) * 1.09875'; I want to extract variables (i.e., 'total', 'price' and 'qty' but not 'sum' since 'sum' is a function name) from this expression. What is the regexp pattern in javascript? Variable name consists of letters, digits, or the undersco...

Replace html text in javascript include

Hi, i've got this: <script type="text/javascript" src="http://xy.com/something.js"&gt;&lt;/script&gt; in my php/html file. It includes the whole something.js file. In this file, there are lines like with "document.write..." that are writing some text on my page. Is it possible to replace a string that is included from this js file in...

scraping website with javascript cookie with c#

I want to scrape some things from the following site: http://www.conrad.nl/modelspoor. This is my function: public string SreenScrape(string urlBase, string urlPath) { CookieContainer cookieContainer = new CookieContainer(); HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(urlBase + urlPath); httpWebRequest...

Create a Count Up Timer in Javascript/Jquery

Hey, I'm just wondering if someone could tell me, or point me in the right direction, on how to make a count up timer. I'd like to have it constantly, from the second I put it into place count up saying the seconds, minutes, hours, days, and years. Thanks! ...

JavaScript "confirm" on SelectedIndexChange of RadioButtonList

I have a RadioButtonList control and I would like to do a Javascript "confirm" when a user tries to change the index. Currently AutoPostBack is set to TRUE. I can, of course, just call __doPostBack from within a javascript function, etc. I tried a few things with jQuery but you have to worry about mousedown vs. click and then there is...

Cancel key down, press, up event in PHP javascript, C#

I want to cancel out key press event when my textarea field gets n number of characters from user. At that point i dont want user to enter any more characters. What to do? Edit: I need it to be done in javascript as well as in php ...

jQuery Validate() special function

I'm using the jQuery validate() plugin for some forms and it goes great. The only thing is that I have an input field that requires a special validation process. Here is how it goes: The jQuery validate plugin is called in the domready for all the required fields. Here is an example for an input: <li> <label for="nome">Nome comple...

Parsing robots.txt with JavaScript?

Is there any robots.txt parser written in JavaScript? I'm usually coding with python and there's robotparser: http://docs.python.org/library/robotparser.html, which is very easy to use. ...

Change Image with transition effects

Hello, I have the following script that changes my image on a timer: var da = setInterval( function() { var current_image = document.getElementById('node_picture').src; var image_index = current_image.substring(48,49); image_index++; if (image_index > 4) { image_index = 1; } document.getElementById('n...

jquery fade effect on 5 images on click

is there any jquery or any script, that when u click on one link, few images on a page change? ...

Does AdSense send a page's HTML to Google for analysis? If not, how?

I'm thinking about making an ad network as an experiment and for learning a new server language. I can't understand how Google AdSense knows what HTML is on a page. The request to googlesyndication.com appears to send them the current page's URL, but no HTML. How, then, do they know what is on the page?! Pages will look different for di...