Hello,
Is it possible to call a function by using the strings ?.
i.e i have a variable var target = 'next';. Using this string i want to call the jquery method next() . Should i use target + '()' (this is bit foolish) to call next() ???
I know it can be done using conditional statements. Since it is a var got from users, it is a heav...
I have created an html page with a Tabber tab functionality.
Each tab has its own table that loads when the tab is clicked and only loads once on the initial tab click to stop the tables loading more than once.
Each tab table exists in its own .jsp html file and is loaded through javascript using the $("#tab1").load('tabqtable.jsp');...
So I was having a debate with a fellow engineer about looping in JavaScript. The issue was about the native for loop construct and prototype's each() method. Now I know there are lots of docs/blogs about for and for-each, but this debate is somewhat different and I would like to hear what some of you think.
Let's take the following loop...
Say a webpage has a function like:
function abc (){
return 'abc';
}
How would I execute and receive the return value of that function from my extension? I've tried this, no dice:
var s = getBrowser.contentWindow.abc();
Thanks in advance!
...
Hi,
I am trying to make a simple Safari 5 Extension that just injects a custom javascript. Any ideas how can I make use of jQuery in this custom script, please? I only know it's possible, because it is mentioned on one of WWDC videos, but I don't know how to do it.
Thanks
...
I'm struggling with this, I am still new to javascript and am trying the jquery $.inarray function as I need to be able to find a value in an array so that I can return other values from the same array "line", such as its ID.
When I try to use jquery's inarray function, like this, I just get back -1, saying that it doesn't exist when I...
I have a "Coming soon" page but i want to add an "insert your e-mail" option and the e-mail to be inserted on a csv or txt file. What i have is an ajax validate e-mail address and the input field:
function isValidEmailAddress(emailAddress) {
var pattern = new RegExp(/^(("[w-s]+")|([w-]+(?:.[w-]+)*)|("[w-s]+")([w-]+(?:.[w-]+)*))(@((?:[w-...
I'm trying to implement parsing of CSS in JavaScript so that:
a {
color: red;
}
is parsed into the object:
{
'a' {
'color': 'red'
}
}
First off, is there a JavaScript / jQuery library I can use?
My implementation is pretty basic, so I'm sure it is not fool-proof by any means. For example, it works fine for basic CSS, but...
So I am trying add an item to the shopping cart without clicking on the add to cart in miva. For example
I go here
http://posnation.com/pos_knowledge
and i click on the Buy now button
it takes me to
http://posnation.com/pos_support/online_kbase
but on that page there is an add to cart button, if you hit it the item gets added to...
Hi,
I'm using firebug and have some statements like:
console.log("...");
in my page. In IE8 (probably earlier versions too) I get script errors saying 'console' is undefined. I tried putting this at the top of my page:
<script type="text/javascript">
if (!console) console = {log: function() {}};
</script>
still I get the error...
In trying to build a page where I can filter the types of jobs and the offices using the hide/show function, I find that if an element is hidden, then an element underneath the element is "told" to hide, it doesn't actually hide. In other words, hide only works if the actual element is shown.
Here is the code, to duplicate, Hide office...
I'm trying to make a WYSIWYG editor, and so far I have it so you can select text and click 'Make Bold' to make the selected text bold. It literally just wraps < b> (no space) tags around the selected text. But my problem is that if I want to un-bold that, my script has some trouble...
So far, here is my script:
<script language="java...
Hi,
I have a json output array like this
{
"data": [
{
"name": "Ben Thorpe",
"id": "XXXXXXXXXXX"
},
{
"name": "Francis David",
"id": "XXXXXXXXXXX"
},
}
I want to loop through it and print out the all the names using javascript. I want to be able to do this.
for(i=0;i<le...
I am just starting PHP (as in today).
I want to create a customizable menu using a jquery script that can have a variable amount of items.
I am getting an error when i run this.
The error is:
Parse error: syntax error, unexpected T_VARIABLE in /home/s0urc3/public_html/files01/menu.php on line 5
Thanks to Chase for his answer
inde...
Hi,
I need to use:
JSON.stringify()
which should be supported by chrome, safari, and FF (I think). I think IE8 also has support for the JSON object. I think IE7 and 6 do not, so I'm doing this:
<!--[if lt IE 8]>
<script src="http://www.json.org/json2.js"></script>
<![endif]-->
so, I think this will import the external...
Say I want to hide a span when the user highlights a bit of text containing that span, with the intention of copying that text on to his clipboard.
For example:
<p>The dragon <span class="tooltip">a large, mythical beast</span> belched
fire at St. George.</p>
I have found that in Firefox Mac, span.tooltip will disappear from view (i...
Hi all,
Is it possible to create your own custom, I believe the term is 'method'? For example, something like this:
var str = "test"
str.replaceSpecial();
where replaceSpecial() will automatically replace say, the letter e with something else.
The reason I'm interested in doing this is because what I want to do is grab strings and ...
Hello All,
I want to have it so when I type into a textbox (or an input field) and have whatever I am typing simultaneously appear in a div or just other place on the page?
The stackoverflow site does this when we type up a question. As we type a question, it shows whatever we are typing in a box below the textbox.
Hope my question mak...
I'm building a bookmarklet for a service. I need to transfer data (url, text) from open window but I don't know which would be the best method. GET limits the amount of data and ajax isn't possible due cross-domain problem.
What would be the optimal way?
...
I Have a select button in php code which Passes the Dynamic generated Row value and How do i do this jquery?
PHP code
<input type ="button" onclick="select(add,'<?php echo $_POST['somevale=ue']?>')"
Javascript
function select (fnname, val){
//Val changes every time
}
How do i acheive the same in Jquery in Putting the click e...