javascript

How to use ActiveX with ASP.NET

Hi All, I have created an ActiveX component, but not able to access that ActiveX compoment in ASP.NET. It gives "Microsoft JScript runtime error: Automation server can't create object" error message while creating activeX object using javascript. ActiveX Component Code: using System.Runtime.InteropServices; using System.Windows.Forms;...

convert javascript regex to php

Hi, I have the following regular expression: RegExp("http://www.amazon.com/([\\w-]+/)?(dp|gp/product)/(\\w+/)?(\\w{10})"); Written in javascript. How can I get it to work with PHP's preg_match_all? What are the differences as far as regular expressions go? ...

Alert Meassage Box Issue

Hi, I have an alert message for displaying the message of validation. But it includes one - symbol. I did not add this symbol on code. my code is shown below. <tr> <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Login :</font> </td> <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <...

Searching for a javascript function definition within a string using PHP?

I'm using Zend_View_Helper_HeadScript to display javascript function definitions in the head of my webpages, and I extended it to get the javascript code from file if desired. What I'd like to know is if there would be an easy way to search the headScript output (basically, a series of xhtml script elements) for a javascript function de...

jQuery + parseDouble problem

I have an AJAX-request that returns a json object containing a few values with two decimals each, but since it's json these values are strings when returned. What I need to do is to perform addition on these values. Just a simple a+b = c, but they concatenate instead becoming ab. I was hoping I could use parseDouble in jQuery just like...

what javascript object am I looking for? click a button-it stays bold till the next one is clicked?

A very basic thing, I know. I have a collapsing div help box thing that is triggered when clicking links. Click the link, the help topic opens in the div. I want the text in the link to stay bold until I click another link. What function am i looking for? I'm using jquery. Thanks! ...

Correctly pass a Groovy list to Javascript code in GSP

I'm making a web application with Grails. I've got a list with data that must be included on JavaScript to perform some dynamic load on drop-list. Basically, I'm getting a two level list from the server, then the first level is presented on a drop box. When the user selects an option, the list associated to this option is presented on a...

Modal centering problem in IE6

Hi, I'm using a popup modal on my site but have an issue with the dreaded IE6. The modal pops up smack bang in the middle of the page until the page is a long scroll, then IE6 opens the modal but you need to scroll up to find it. The code I'm using is as follows. $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/...

Using checkboxes with Jquery AJAX

Hi all I am using JQuery for some AJAX functionality. But when is pass the value of a checkbox, the value is show regardless of whether the checkbox is ticked or not. Here is my code: $(document).ready(function(){ $('#submitform').click(function(){ $.ajax({ type: "POST", url: "abs_newabs_check.asp", data: { allday: $("#all...

how to get page HTML at client side or javascript

how to get page HTML at client side or through javascript in Asp.net Application. Means if I want to get the html of http://www.yahoo.com on client side through javascript or any other ...

Problem in form validation with JavaScript

The editvalidate() function is not getting called at all: Please suggest why. What's the remedy? <script type="text/javascript"> function editvalidate() { var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/; var numericExpression = /^[0-9]+$/; if(document.editprofile.userid.value == '' || document.editprofile...

ASP.NET Specify which files should be cached

I am developing a website in ASP.NET and I am using various javascript frameworks/libraries. The different files belonging to these frameworks/libraries rarely changes thus there is no reason to refresh those files once they have been sent to the client browser (atleast not everytime a page is served). I see that the HttpContext object ...

[Java > ScriptEngine] Validate JavaScript-Code

Hello, I use Java's ScriptEngine to execute JavaScript Code. I use the Invocable Interface, so that I can use the Script Code as a normal Java Object implementing a Java Interface. If the JavaScript Code is invalid does not follow the interface (missing methods, wrong return type, throws an exception etc.) I get an internal Excepti...

Click link when clicking LI

Ok, I have this list layout that I use, and I want the list row to highlight when I hover it. Now, that's not a problem really, since I can use javascript to change classes for example, but I want the cursor to change to a pointer when hovering and when clicked, I want to follow the link within. Example code can be found here: http://s...

How to find an element using CSS2 Selector in Motoools and hide it?

Hello! How can i find this span element with class="rocon.rocon-br" in #conttile2 by Mootools' Css Selector? This element is created dynamically by Javascript (rounded corner), so this is what i see in Dragonfly Dom tree for it: html > body > div#wrapper.wrapper > div#penalties.container > h2#conttitle2.rc10.rocon__8.rocon-init > span....

Javascript Table Select

I am trying to select a table row, and highlight it with javascript. However, nothing seems to work. When I comment out the first two lines of the following code, I can highlight, but when I click another row, the previously selected rows stay highlighted instead of going back to white. var selectedEventId = 0; function SelectR...

Using Javascript to replace Text in HTML tag with innerHTML and functions

I'm trying to change the text inside a h1 tag using the element id "greeting" and a external java script. I'm having trouble trying to figure out how to call upon my function init that has gathered variables and use them in the next function. Heres what I have so far. HTML <head> <title>Matt Beckley</title> <scrip...

A way to observe url in urlbar of firefox, and get an event every time it changes

I need it for my firefox extension. I don't care about waiting the page load completely, I want only observe URL and get an event every time it changes, also when I do history back and forward. edit: I saw An observer for URL changes (Firefox Extension), but i wondering if there is something much simpler, like an event that fires every ...

JavaScript is a NaN, but I know it's not?

I have the following two functions... function splitTitleString(titleText) { var titleText = titleText; var temp = new Array(); temp = titleText.split(' - '); var now = new Date().getTime(); var warningExpResp = 7200000; var expRespDateTimeTicks = 0; var slaDateTimeTicks = 0; if(temp[0].length > 0) ...

Call webservice through Javascript

Hello, I am calling websevice through javascript by using SOAPClient and its working in Internet Explorer But not working in Firefox. Actually Its working in firefox also when a webservice within same folder or same project. But it not working in firefox if the webservice is not within same project. For Internet Explorer it works in ...