I have an element, an anchor, how can I "click it" with jQuery, I mean like a normal user click, because I'm receiving a click on an element..but also I need to fire more events...
Ok here is my example
<a class="som" href="http://domain.com/ssl-signup.php" target="_blank">Test Link</a>
$(document).ready(function(){
$('.som').click(...
how can i convert xpath like
/html/body/div[3]/ul/li[1]/a[5]
html > body > div[3] > ul > li[1] > a[5]
i believe, index is not supported with CSS3 selectors....so how to deal with this ?
...
var asdf = "a[3] > b[5] > c[1]"
function removebracket(){
var newstring = asdf.replace(/\/[^\/]*$/, '')
alert(newstring);
}
<a href="#" onClick="javascript:removebracket();"> remove square brackets one by one </a>
...
I see this pattern a lot (which I actually use) but I want an explanation as to how it works.
var mystuff = function() {
var blah = function() {
};
return {
setup: function() {
blah();
};
};
}();
Then usage is very OOP like:
mystuff.setup();
...
Is there any way to place an image inside of a text field with HTML/CSS/JS, not using the image as a background? The image needs to be clickable and positioned on the right of the field, too. Thanks.
...
If I write some JavaScript that runs in an <iframe> (which is dynamically created and added to the DOM with JavaScript, if that matters), is it isolated from the global namespace of its parent page, or are conflicts still possible?
I did some Googling and came across this page, but I can't really make sense of what he's doing here, or i...
I'm developing a facebook app right now all by my lonesome. I'm attempting to make a javascript call on an onclick event. In this onclick event, I'm populating some arguments (from the server side in php) based on that item that is being linked. I'm inserting a little bit of JSON and some other stuff with funky characters.
Facebook expe...
I have a jsonstore that is supposed to load a user's information. I have its HTTPRequest as a GET but when I finally do load up the store with parameters, it automatically changes to a POST request.
I've done something similar to this before, except it was a regular datastore, and the request stayed as a GET. Is the default behavior...
I have a php file somejson.php that echos a json encoded array
{"jsonone":"first json","jsontwo":"second json"}
I'm trying to access the response with jquery ajax to use this data outside the score of the ajax call. It keeps giving me all kinds of object(Object) or undefined errors.
I'm guessing it's something as easy as wrong synta...
I want to call a JavaScript function through PHP and store the returned value in a PHP variable. How to do this?
...
Hi All:
I have been working on the last bit of my php + ajax based datagrid project.Everything works as I designed except one thing : I cannot stop user opening multiple selection boxes...
Go my research page and use username "ChenxiMao" and password "accedo" to login(without double quotes).
Note that perhaps the images used in th...
From http://developer.yahoo.com/yui/docs/YAHOO.util.DataSourceBase.html#method_sendRequest,you can see the oCallback is an object literal with the following properties:
success
The function to call when the data is ready.
failure
The function to call upon a response failure condition.
The problem is that it does not mention what paramet...
$(this).parent().parent()
.children(this.attr("tagName").toLowerCase())
.css("background-color", "yellow");
xpath:
/html/body/div/table/tr/td/b/a
$(this).tagName is Anchor <a>
the problem with this is that children() looks at the immediate children of $(this).parent().parent(). Hence it will highlight <b> instead of <a>
i need a ...
Hi
What is the recommended way to transfer files via FTP and manage (rename, move, delete) files in an FTP server programmatically in a Windows Scripting Host script file (JavaScript/VBScript)? Preferably without requiring 3rd party ActiveX add-ons since these "extra" software will need to go through an approval process that will take ...
hi,
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick ="toggletr();" />
<script type ="text/javascript" >
function toggletr()
{
debugger;
var Inputs =$get("TextBox1");
}
</script>
i trying this i am getting error:
Microsoft JScript runtime error: Object expected
but in textbox it contains v...
Using an adapted version of jquery.inplace.js for some page creation and use an OBDC connection in the background php file to query for content. Everything works, BUT...
I am surprised that IE6, 7, or 8 are all pretty quick, as is chrome, but firefox seems to take quite a few seconds for exactly the same task, in this case.
This is wit...
I want to find the number of the week which a day belongs to in javascript. My definition of week is the number of saturdays there have been up to that date. So the first few days of january are counted as the final week of the previous year. From there, the first saturday to the preceding friday is week 0 (0 based week counting).
Anyon...
In one of my web pages I have a HTML table. This table will have 0 or more rows and each row has 3 columns.
It looks like this:
<table>
<tr>
<td>Row1-Col1</td>
<td>Row1-Col2</td>
<td>Row1-Col1</td>
</tr>
<tr>
<td>Row2-Col1</td>
<td>Row2-Col2</td>
<td>Row3-Col1</td>
</tr>...
hi,
i am using tomcat server and i have added a rhino engine to able some scripting abilities on my users. the second phase is to provide some debug environment.
i know rhino has a debug API but i could not find any documentation/code samples about how to work with it, and build a debugger around it
any one knows?
...
My app uses javascript to generate all the HTML for my website. The index.html basically just contains
<div id="menu"></div><div id="content/><div id="content2/>
And the javascript replaces the divs. I find myself doing a lot of repetitive tasks when I need to create a form.
var html = "<form id="form1"> ... </form>";
Is there a go...