I have the following if statement in javascript. I am targeting pages which have art-8 in url.
Sample url is like this,
http://www.mywebsite.com/art-8.asp?id=435&iPageID=43
However this will pick up an url with cart-8 and I don't want that.
I want only select art-8 in url not cart-8.
How should I change it?
if (location.pathnam...
Hi,
Sory for the title and the topic, I didn't really know where to put my question :) .
I'm looking for a way to automatically get the HTML source of an openned page in firefox so I can use it in a C# application. For example, I would browse a page in firefox. When I would like to get some data I would start my program and refresh the ...
I have code for get part of anchor:
function _get_part(queryString, name) {
var match = '&' + name + '=';
var i = queryString.indexOf(match);
if(i < 0) {
match = name + '=';
if(queryString.slice(0, match.length) == match)
i = 0;
}
if(i > -1) {
i += match.length;
return queryString.slice(i, queryString.i...
Hi,
I need to retrieve some information from a Liferay server with Javascript.
I build a service in Liferay so I can generate SOAP requests to the wsdl file and retrieve the data I need. That works well with a SOAP client.
What is the easiest way to generate these SOAP requests in Javascript?
I already tried to use the Javascript SOAP...
Hi!
As the title of my question states. whenever the value of an input element changes I want it to execute a function. I know that the function is working because I've been tested in onkey events like onkeyup. But, I don't wont to use onkey events because I have scripts that manipulate the input element's value. I also know that the pr...
Hi,
I've got a fairly extensive data entry task to perform in a PHP application. The application allows you to enter one data set at a time (first name, last name, email), click 'Go', and then uses AJAX to submit the data and blanks the form, putting your cursor back in the first input. I have a data set of 1,300 that needs to be entere...
Is it possible to change the background color of HTML header text in JavaScript?
Edited: oops - i did forget to add that is it header text in jqGrid..
i'm sorry about that..
...
Hello.
Using SQLite in HTML5, how do I execute a call such as the following so that it's returned immediately, instead of passing off the result to another function?
try {
mydb.transaction( function(transaction) {
transaction.executeSql(
'SELECT name FROM celebs order by name limit 100 ',
[],
...
Hey
I am not JS expert.. I want when I select a < option> in < select> it will pass the user to another page.
How can I do it?
...
Hi there, I'm trying to dynamically alter all objects in Javascript so that its construction can be hooked. This is what I've got now, which almost works properly:
Function.prototype.beforeConstruction = function(newFunc) {
var oldObj = this;
var newObj = function() {
newFunc.apply(this, arguments);
oldObj.apply(...
I have one link that makes an ajax request and it prints by XHR request another link same at this one before cliked
so it's like a loop:
starting XHR from
<a href="javascript:void(0)" class="doXHR">do XHR</a>
than into Ajax success function i repeat into my html this link:
<a href="javascript:void(0)" class="doXHR">do XHR</a>
but...
I want to be able to draw a fitted rectangle around text labels (person's full name). The margin isn't terribly important, but I can't just draw fixed-sized rectangles because the labels vary in lengths. How do I do this?
Here's the code that draws the text labels:
var ctx = document.getElementById('map').getContext('2d');
for (i=0; i ...
I'm not highly familiar with javascript but I think this is the best way to accomplish my purpose... If not, please correct me.
I have a licence text 2 buttons at the end. All of this is written in HTML in a WebView because there are some links in the licence. Now, I want that when the user clicks the "ok" button in the WebView, this ...
each() method in jQuery contains such a statement:
callback.call( value, i, value )
I couldn't understand what this statement means exactly.
I know what callback and call mean but I couldn't get the arguments of the function call: (value,i,value). What does this mean?
The statement is used in a for block of each() but my question...
I am doing some server side coding with JavaScript (node.js) and I would like to write valid xml.
I found two libs, but I am sure there are more/better!?
http://goessner.net/download/prj/jsonxml/ (LGPL)
not yet released: https://sourceforge.net/projects/jsonix (LGPL)
Requirements: open source (for commercial usage)
Would be cool if...
Guys, I've been using Notepad++ for some time now and I'm kinda sick of the UI it has. I don't know, it's just too... old or what should I say. I need something that is more simple in the UI but still has good functionality, I also need something that is really an eye-candy.
Do you have anything to recommend?
...
Hi,
When I add text to a div in a chrome extension popup, the text appears for a fraction of a second and then immediately dissappears again.
This is a small example:
<html>
<head>
<script>
function show() {
var newName = document.showMe.textToShow.value;
var txt = document.createTextNode(newName);
...
I need to get the URL of an element's background image with jQuery:
var foo = $('#id').css('background-image');
This results in something like url("http://www.example.com/image.gif"). How can I get just the "http://www.example.com/image.gif" part from that? typeof foo says it's a string, but the url() part makes me think that JavaSc...
I have one JS-file that is merged and compressed from several separate files.
So when we start our app, there is only one http request for the JS-file which makes loading it really fast for all pages.
But, a lot of the code is jquery in document.ready(). It binds events and other code to elements on certain pages, but not all code is ne...
The JavaScript script works with Chrome and Firefox but not in Safari. The code is:
$(document).ready(function(){
$(window).load(function() {
myVariable.start();
});
This generates:
ReferenceError: can't find variable: myVariable
The variable is defined in another JavaScript page that is included in this pag...