When a user clicks on a link, I need to update a field in a database and then open the requested link in a new window. The update is no problem, but I don't know how to open a new window without requiring them to click on another hyperlink.
<body onLoad="document.getElementById('redirect').click">
<a href="http://www.mydomain.com?Repor...
I'm creating a website that could potentially contain many widgets. These widgets are rendered using external javascript code in external js files. Some of these widgets require the same external javascript files but i obviously dont want the browser including (ie: ) a javascript file whenever a widget requires one; instead it will only...
I am using an application which has a cumbersome menu structure and I would like to create a bookmark to a specific page within the application. The app does not update the url as you click around each screen, and the top level source is
I can get the url to the menu item I need, but if I use that in my bookmark, the toolbar is...
I am using Safalra's javascript to create a collapsible list. The script works across several browsers with no problem. However, when I apply the javascript to my own list, it fails to act as expected when I use IE (I'm using 7 at the moment). It simply writes the list, without the expand and contract images.
I copied the Safalra's jav...
OnclientClick of a button I hide a panel client side. I only want to hide it however if all input is valid. Is this possible in Javascript?
...
(Yes, I know there is a similar question on SO, but it's 8 months old -- since then IE8 RTM has come out -- and not very illuminating)
Is it possible to disable IE8's 'Accelerators' on my site? When highlighting text, I have a small popup box that appears beside the cursor (similar to Office 2007) which is being obstructed by them.
I ...
I'm trying to insert a TH as the first column. But so far always put it at the end of all columns. Any help will be appreciate it. Thanks
var someNode = document.createElement("th");
someNode.innerHTML = "Hello";
var sp = document.getElementById("table").getElementsByTagName("thead")[0].getElementsByTagName("tr")[0];
var ref = document...
Is there a way to link to another page's content using coordinates, without using #anchors? For example, say I want the link to go directly to content that's 1200px down the page. How can I do this? Javascript, server-side magic, anything goes as long as it will work for the average visitor.
...
I'm new to JSPs so bare with me.
I have a JSP where I'm using a javascript framework to build a chart using the Google Visualization API.
My servlet is returning a sales hashmap object with year as the key and integer (sales number) as the value.
My javascript uses the sales object to add data to the Google chart API which builds my ch...
I need a simple regex to validate a phone number of the form x-y, where x and y can represent any number of digits and the dash is optional, but if it does show up it most be within the string (the dash must have digits at its left and right)
...
I am pulling in data from a JSON file using FBJS AJAX. On of the values in the json file is a date. The date has a UTC format, Date(1255535021000-0600).
However, I am getting an "invalid date" or "NaN" error whatever I do.
I have tried the following: new Date(1255535021000-0600), new Date(1255535021000), Date.parse(1255535021000-0600),...
Hi there,
I have some javascript code that has in it localized messages that i pull from my resource files. My problem is that if i include my javascript files like...
<script scr="..." type="text/javascript"/>
in my masterpage for example, then the <%= Resources... %> code is not running on view rendering. My current way of resolvi...
I'm trying to create a dynamic select box in JavaScript with a range of years starting with 'some' year and ending with the current year. Is there anything like Ruby's range class in JavaScript or do I have to loop trough the years using a for loop?
Here's what I've come up with though I think it's a bit much considering in Ruby I can ...
I have an ajax function which call a servlet to get list of products from various webservices, the number of products can go upto 100,000. i need to show this list in a html table.
I am trying to provide users an interface to filter this list based on several criteria. Currently i am using a simple jquery plugin to achieve this, but i f...
First, here’s the page question:
http://www.tranzact.com/test/solution_freightfaqs.html
I used a simple “Print Page” function (below):
<a href="#" onclick="window.print();return false;">Print Page</a>
Below is the toggle.js script:
function toggle(theID) {
if(document.getElementById(theID).style.display=='none' ){
document.getEle...
I'm trying to build an easy to use map system for the applications we develop at work. I started using Google Maps but I have to abandon that because of the lack of SSL support. While Google Maps API Premier has SSL support, we can't afford the 10k a year fee. I'm considering using Mapstraction so that in future, if I need to change prov...
What I want to do is determine if a string is numeric. I would like to know what people think about the two solutions I am trying to decide between (OR if there is a better solution that I have not found yet). The parseInt function is not suitable because it will return an integer value for a parameter like "40 years old". The two soluti...
yes this is 2 questions.
this is the idea. i want to put lightbox(or slimbox or mediabox or whateverbox) to my forum so that it will open user posted links in lightbox.
problem is, lightbox require rel=lightbox tag.
and people are too lazy to use the custom bbcode that add the correct rel tag to the link.
so, can lightbox (or any othe...
I have a sign-up form that takes several steps.
In one of the steps, they fill up some information, and they select some images to upload.
The next step, they see a review of their application.
What is likely to happen next is that if the user sees something he doesn't like, he will hit the back button to change what's on the form.
H...
I have 2 pages in a frameset, in the first page i have a Javascript Function, the second is an asp.net form with a button, the thing is that I need to call the Javascript function in the first page when user clicks the button:
I'm trying with:
ClientScript.RegisterStartupScript(this.GetType(), "myScript", "<script language=JavaScript>p...