Hi,
I've got a script that changes the background colour of text that has been selected. However i'm encountering an issue when the text is selected across multiple elements/tags.
The code that i've got is:
var text = window.getSelection().getRangeAt(0);
var colour = document.createElement("hlight");
colour.style.backgroundColor = "Y...
Hi guys,
I'm currently doing a highlighting function on a webpage and im using the jquery plugin for that. My code looks like this:
var input = function() {
var matchword = $('#searchbox').val();
if(matchword != "") {
$('body').removeHighlight();
$('body').highlight($('#searchbox').val());
}
}
$(do...
In Drupal you can create your own nodetype in a custom module. Doing this you get to create your own form which is all very nice.
However if you want to add js the form things get a bit more tricky. If you add the js in the form, the js will only be added form the form when it is loaded. If the user would post the form with validation e...
I 'm devoloping a web page which has multi simalar inputs(lots of dropdownlist,text) grouped by some type selection (for example an imagetype input has some dropdowns,text inputs alse an other type has similar dropdowns ,text inputs also... )
these inputs will be selected over a treenode.
when a node selected,input values of the selected...
Hi guys,
I got a little scope related problem with some js code, maybe somebody can explain to me what I'm making wrong:
I'm using extJs and got this snippet:
Ext.onReady(function(){
// Form for filter selection
var formFilter = new Ext.FormPanel({
// ...
items: [
cbGroup = new Ext.form.ComboBox({
fi...
I have two dropdownlists - one for year and one for weeks. How to determine the chosen weeks date should be the friday. So for example I chose week 34 and year 2011 then I should know the date on friday, in format like this: 2011-08-23.
And preferably in javascript too.
...
Hi all,
I dont want that my webpage show security information about this page contains both secure and nonsecure... this only happen in ie6, i am testing with the program ietester. I know that the problem is in file mootools-1.11-uncompressed.js in this line
if(!$("ie_ready")){var C=(window.location.protocol=="https:")?"://0":"javascr...
I tried this javascript but it doesn't work - here
I need to change the button's enabled property to true when the checkbox is checked and to false when it isn't. This is my code.
<tr>
<td colspan="2" align="center">
<asp:CheckBox ID="cbAcceptAgreement" runat="server" OnClientClick="acceptAgreement(this)" />
<asp:Label ID="lb...
How can I get the size of a file using JavaScript (preferably using MooTools 1.2)?
...
I have to call Javascript funtion based on the bean value. i use the following code
onmouseover="#{occasionBean.user.userPreference.defaultPreview==true?'':'Tip()'})"
I need to send some parameters in Tip() like this
Tip('<img src="pics/image.jpg" width="60">')
Error i am getting is javax.servlet.jsp.JspException: javax.faces...
in javascript how to send request some url at a partcular time(e.g daily 5 pm).........
very day @5pm i have to send some request (url)e.g sending emails how to do in java script
...
I'd to use DW cs 4 but before to buy I want to test javascript code hints.
However that feature doesn't work at all.
I have an external .js library and then into an html file I load it
but when I type functions or object by name nothing happen.
Any idea?
...
Hello,
I am developing new app. using titanium 1.0 In that I am opening phtogallery in new window but I am not able to open it why this was happened?
Code to open photogallery in app.js
Titanium.App.addEventListener('recordvideo', function(e)
{
win1.close();
var w = Titanium.UI.createWindow({
backgroundColor:'#336699',
title:...
I am working on a secure site, https.
I am using the colorbox jquery plugin to iframe another page from the same site over the current content.
In IE6 when i close the colorbox overlay i get the following message:
"This page contains both secure and nonsecure items.
Do you want to display the nonsecure items?"
Any ideas why this is ...
Hey,
I have a 100% width and height flash object in my site. Activating and exiting browser full screen mode with F11 only works as long the user didn't click the Flash movie. And I doubt many users know they have to click the address bar to enable F11 after using a (browser) full screen Flash movie.
Is there any way I can enable F11 t...
My logic is
if( !this.draginited() ) // a drag-disabled element shouldn't get pass here, as it is inited
this.draggable({...})
I searched a lot and couldn't find a way to implement this logic, any ideas?
...
var RegTxt = "$f1$='test' AND f2='test2'";
alert(RegTxt.match(/\'[^\']*'/g))
returns the match correctely i:e 'test','test2' but how can i remove the single quote in the match.
...
How can I get the id of the selected node in a jsTree?
function createNewNode() {
alert('test');
var tree = $.tree.reference("#basic_html");
selectedNodeId = xxxxxxxxx; //insert instruction to get id here
tree.create({ data : "New Node Name" }, selectedNodeId);
}
...
I have a webpage where there are two buttons and a textbox. When the page loads and user presses enter, the first button is clicked - and that is ok.
I would like to assure that if user enters the textBox and types anything there and THEN presses enter, the second button is clicked.
When I enter the textBox I can tell that the first but...
I am trying to use the following script in asp.net:
<script language="javascript" type="text/javascript">
function checktext() {
var txt = document.getElementById('tbComments');
if (txt.Text.Length > 0) {
alert('Thank you for submitting feedback.');
return true;
}
else {
...