I want to generate an abbreviation string like 'CMS' from the string 'Content Management Systems', preferably with a regex.
Is this possible using JavaScript regex or should I have to go the split-iterate-collect?
...
For those who don't know what a bookmarklet is: http://en.wikipedia.org/wiki/Bookmarklet
...
Hello everybody,
When my website is in fullscreen mode (with IE8), the window.focus() javascript command doesn' work.
Do you have a fix for my problem?
I tried to put a window.blur() before, without success.
Thank you!
Nicolas
...
I have a website where I am including a php library file and a javascript library file. I have condensed the problem to the following files:
index.php
<?php
include('constants.php');
?>
<html>
<head>
<script type="text/javascript" src="lib.js"></script>
</head>
<body onload="javascript:show_const_1('<?php echo(CONST_TEXT);...
Is it possible in Javascript to open a popup in a new tab of the browser? I don't care if the solution is not cross browser.
I know the HTML solution with the target attribute but i must do it in javascript beacause i need to do it automatically without any click.
...
i'm bind a dropdown
("#dropdownlist").change(function(){});
i'm calling the above code so many time.
how can i unbind this event before binding it each time....?
...
For example, if the user has JavaScript enabled, we send hash his password and send the hash. If not, we send the password unhashed and a flag to mark that it is unhashed. We then build the hash (if it's unhashed) and compare it to the stored hash.
This seems to be secure and simple. Why isn't it a popular way to send a password? Did I ...
I've created a very simple test page to replicate a problem I'm having within my application.Sorry if this looks long winded for something so trivial.
The .aspx page
<body>
<form id="form1" runat="server">
<asp:TextBox ID="tb" runat="server"></asp:TextBox>
<asp:Button ID="btnOk" runat="server" text="OK" Width="60px" UseSubmit...
I have a situation where I need to intercept every key thats being pressed in to a contentEditable div. But when the keypress event happens, if I do,
document.getElementById("divEditor").innerHTML
I cannot get the full text (does not have the last character pressed)
Also, keyup event doesn't fire for continuous keypresses. What can I...
When a user clicks a "Download PDF" link, I would like for the download prompt to appear and for the user to be able to download the file.
Currently, the user is just transferred to the address of the PDF file.
For example:
<a..[what goes here??]..>Download PDF</a>
It seems that there's a combination of JavaScript & PHP needed to do...
I tried a lot of ways but non of them worked. For example that one works:
$('#iframeid').ready(
function()
{
alert('Hello');
}
);
but following doesn't (alerts hello but do not focus.)
$('a:link').click(
function()
{
alert('Hello');
var iframeRef = document.getElementById("if...
Hi,
I want to be able access an rss feed from js. I have the ability to configure both servers to use the same domain (but different subdomains - eg static.benanderson.us and tech.benanderson.us). I was hoping I could use the document.domain property to get around the xss issue. Here's a snippet http://static.benanderson.us/example.j...
I have some small images and each has a "print larger image" link.
For example:
<img src="thumb.jpg">
<a href="#">Print Larger Image</a>
When the user clicks the "print larger image" link, my goal is to trigger the printing of "big.jpg".
How can this be done?
EDIT: ANTHONY HAD THE RIGHT SOLUTION FOR ME. I MODIFIED HIS CODE A BIT TO...
I am wanting to be able to disable the click functionality of a radio button so I can uncheck it.
However, when I uncheck it, the click still fires and the end result is a radio that unselects (and modifies other page elements accordingly), and then re-checks because of the onclick event.
var clickFunction = function(e, radio, p){
...
Sorry I am new to JavaScript.
Says that a.html has two same anchor links (<a href="b.html">b</a>). The anchor links are uneditable but we could add JavaScript to the a.html.
Except for dynamic adding onclick event, any other ways could get to know which anchor link being clicked?
...
Since I think people have encounter it lots of time before I did and there may be some standart solution.. Can anybody give any hint direction how to prevent a user from typing non ascii characters in a textbox.
...
In Firefox 3.5, I type this in the Firebug console :
false=={} // => evals to false
{}==false // syntax error
What is the explanation for this ?
...
I have a jsp page which has dynamically created hyperlink called "Add Note".End User
can click on the link ,which would open a popup window and user can a add new note, by dynamically creating new table row and populating it with values, till user closes the window , the parent page should not be allowed for modification,once user closes...
I'm capturing the window.onbeforeunload event using the following code:
window.onbeforeunload = function (evt)
{
if(checkIsDirty())
{
var message = 'If you continue your changes will not be saved.';
if (typeof evt == 'undefined')
{
//IE
evt = window.ev...
I'm primarily a server side developer, working professionally with PHP. For javascript I always use a framework (jQuery/mootools), will this be a professional disadvantage for me down the line? Should I put the time in to learning straight javascript, or are most developers moving over to frameworks anyway?
Thanks.
...