I have a string like this:
var str="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body><table><tr><td style="color:#FF0000">demo1</td><td style="color:#FF0000">demo2</td></tr></table></body></html>";
I have to get the contents inside all td elements alone using regular expression in ...
Our site uses Facebook Connect to allow users to post updates to their Facebook. The javascript that allows this has to be loaded directly through Facebook's Feature loader, and we had been loading it on every page where a user might want to connect to Facebook. Unfortunately, because some users have Facebook blocked at their workplace...
I have two html select objects named with the same name (they are arrays with different indexes).
What I am trying to do, is if "off" is selected from the category[0] select element, I would like to disable the category[1] element. I have been trying to use document.getElementsByName() but am having no luck figuring out how to specific...
Is there a way to clone HTML elements using JQuery?
However, I want to be able to assign the cloned elements new attributes "id, name". So if I had a textfield element, I want to clone it without its value and change its id and name attribute to "exmple2" if it was named "example" previously.
I would appreciate any help on this and any...
Question level : Intermediate / Beginer
I created a form with
`method="post" action="eh.do" onsubmit="return Form1_Validator(this)"`
The validation is successful and works fine when i hit submit.
But on the servlet, i have a concatenate function to merge the values together.
When the java script is turned on, ie when i write o...
So I have this ASP.Net 2.0 website that uses functions contained within a JS file. When a webpage loads the js file loads fine. But when I change something in that file on the server the changes are not propagated to user's browser. It keeps working according to the out dated file. How can I force the browser to reload the modified file ...
Hello!
I am trying to stop the loading of images with javascript on dom ready and then init the loading whenever i want, a so called lazy loading of images. Something like this:
$(document).ready(function () {
var images = $('img');
$.each(images, function() {
$(this).attr('src', '');
});
});
This doesn't work (tested in ...
Basically I have a window containing a formPanel with items, that is shared at multiple places. Meaning that the formPanel's items might vary slightly. (the type of controls).
I've managed to dynamically clear and add custom buttons for the appropriate situation on the window.
But I'm experiencing a slight problem with the formPanel's ...
Can you guys help me figure this out? I have the following JavaScript snippet:
pattern = new RegExp('^bla*a', 'i');
console.debug(pattern.exec('blatr'));
After I run this, the output is ["bla"].
The way I interpret this regular expression is this: find me a string that starts with 'bla' and ends with 'a', with as many characters in be...
Hi All !
I have to code below - works great in IE and Opera, but does not work
at all in Firefox / Netscape. Any ideas?
The problem is that nothing happens when clicking printer friendly.
<html>
<head>
<script type="text/javascript">
function onPrint()
{
window.printForm.submit();
}
</script>
</head>
<body>
<form...
I would like to implement some "Drag-select" functionality into a project of mine but i'm unsure how to implement it.
The creation of the selection area is not a problem, it's the capturing of elements within the area itself which is confusing me.
...
I'm using qtip ( http://craigsworks.com/projects/qtip/ ) to make tooltips. Now I need to show tooltips when button is pressed and hide tooltips for example when 3 seconds has passed. My current code is not working, tooltips will sometimes go away and sometimes stay...
var self = $("#email");
self.qtip( {
content: error,
...
How to create a open a webpage as a popup using c# and need to run a function when the popup window is closed. my intention is to create a web login/logout and run a function after successful completion of the event
...
By default JSF renders the HTML field id name dynamically. ID name is generated randomly in the format formname:id_some_random_number.
Because of this i cannot use document.getElementById("").
Is there any solution for this problem?
...
HI,
I am using a bot program in which i want to find out the link of captcha image so that i can display on a Jframe.
When i am looking to page source their is no image link of captcha on it.It is generated on by javascript.
Please some body help me.
Thanks in advance.
...
I'm currently developing a firefox extension which checks some server side XML-File on a regular basis (every 2 minutes). I want to add the following feature:
Whenever the user is inactive for X minutes the check interval is extended by a multiplicatior of Y until a limit of Z is reached. In order to do so, I need the inactivity time. I...
I've heard this quite a few times. Are JavaScript loops really faster when counting backward? If so, why? I've seen a few test suite examples showing that reversed loops are quicker, but I cant find any explanation as to why!
I'm assuming it's because the loop no longer has to evaluate a property each time it checks to see if it's finis...
Hi,
i want someone to include a JS file of me which does something neat. I thought i put it up just like Google: you put a script tag in your source and the google js takes care of everything.
in my php file is this:
echo '<script type="text/javascript"
src="http://www.site.com/gadget.js">
</script>';
i that gadget.js, i write a s...
Can you suggest some good Javascript assignments/homework to C programmers, who are not much familiar with Javascript?
They are strong in C, hence basic Javascript.
I need few JS related assignments which I can assign to them, to help them understand Web-Dev and Prototype concepts.
I'm not looking for the tutorials which they need to ...
What does the below JavaScript mean? Why is the function embedded inside ()?
(function() {
var b = 3;
a += b;
}) ();
...