Given an XML element in jQuery like so:
$('<foo oy="vey" foo="bar" here="is" another="attribute" />')
Can I use either jQuery or plain old JavaScript to get an array containing the names of all the attributes in an XML element? I would expect this:
['oy','foo','here','another']
...
Hi all:
Suppose I have the following html:
var testString = '
<span id='id'>
<div>
<table>
<span id='anotherId' class='NODE customContext' name='2'></span>
</table>
</div>
</span>'
and I want to convert it to a DOM structure using jQuery (under the assumption that jQuery is the best option to handl...
I have an asp.net TextBox in which I want to check if the text entered into the TextBox is > 0. It works once I tab out or click out of the TextBox, but if I keep focus on the TextBox, it won't fire the Text Changed Event, so I have the following scenario, I want to enable something if and only if the TextBox.Text.Length = 0. Now, if I...
From my recent question, I already created some JavaScript function for dynamic loading partial view. So, I can't debug any dynamic loading JavaScript. Because all of loaded JavaScript will be evaluated by "eval" function.
However, I found some way to create new JavaScript by using the following script to dynamically create script into ...
I want to write ajax code in java i.e. i want use the functionality of ajax without using ajax. I'm looking for some API of JAVA which can do so.
Like we post data of a web page through JAVA program similarly I want to perform operation of ajax through JAVA program.
Please suggest.
...
How do I implement a simulated frameset in ASP.NET MVC without running afoul of browser differences?
If possible, I would like a header and two vertical panes. The header will be pinned to the top of the browser. The left pane will contain an index of some sort, and the right frame will contain content. Each of these panes can have i...
I have a HTML fomr which uses special characters in ids ( :,-,_ ). The form uses JQuery validation plugin to validate the user input. Specifically the id includes a GUID
Following is the sample code:
<script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-validate/jquery.valida...
Hi,
My goal is to catch pageloads in my component, insert some javascript into the document and then catch onFocus events. On an event i then want to call the javascript function i injected.
Now i managed to solve most issues, i have the script added to all webpages and i can catch onfocus events. What im not able to do is execute a ja...
Hi,
i m getting a web page content in a string by using java.net.URL and Input Streams.
the problem i m having that my javascript is not rendering and i m getting the as it is response.
<html>
<head></head>
<body>
<script>
document.write("<h1>hello world!</h1>");
</script>
</body>
</html>
suppose this is the code written i...
The goal here is to manipulate some DOM nodes before they are inserted into the document, using prototypeJs methods.
Test cases:
<html>
<head>
<script type="text/javascript" src="prototype.js" ></script>
</head>
<body>
<script type="text/javascript">
var elt = document.createElement("DIV");
elt.id="root";
elt.innerHTML="<div id...
Possible Duplicate:
What is my script src URL?
I have situation:
<script
type="text/javascript"
src="http://server/some.js">
</script>
In file some.js I need to know full path of same file some.js, eq. "http://server/some.js". How can I do this?
I can't change HTML code (clients are including JS file).
...
Hello,
I'm using document.nodeName.innerHTML to change the content of a particular node. It is not working in my case. Can someone please let me know where I've went wrong.Thanks in advance. Please find the below code. On click of a link, I need to change the text of that link.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//E...
Hi,
I have created custom control using asp.net 2.0. The control contains a textbox txtDate. I have also created a javascript file DateMask.js which contains a function maskDate(). I have attached the maskDate() with textbox using -
txtDate.Attributes.Add("onkeypress","maskDate()");
I have also registered the script using ClientScript...
Hi all,
I am using the jQuery UI Datepicker.
However a vertical CSS scrollbar overflow-y:scroll causes a bug for Firefox, Opera and Safari.
This bug can easily be reproduced by copying the sample code of jqueryUI and adding 2 lines css declarations:
body { overflow:scroll }
#datepicker{ position:absolute; right:1px }
A demo can b...
I have looked at similar queries here, but I can't seem to apply them to my problem. I am pretty new to jquery, so I may be doing something dumb.
I have a simple getJSON test:
$(document).ready(function() {
$(".testurl").click(function() {
// do a json call
var url="testjson.php";
var rc=$.getJSON(
url,
{parm1: "P1"...
HEllo,
I have a site where I want to introduce reply user functionality. How to make an ajax loaded reply text field like a popup? currently, i m using a text field which takes hell lot of time on clicking reply. Is there any method to make it faster?
My ajax call is :
$("#replyMe").click(function(){
$().ajaxStart($.blockUI);
$.aj...
Hello, how can I get this scroll back to the top neat thing from this link , just scroll down a bit, you'll see in the bottom right icon(top pointer) that scrolls back to the top on click. Thank you
...
Need help with a math issue:
i need to get the true angle from 0 degrees using x and y cordinates
im using this at the moment:
Math.atan((x2-x1)/(y1-y2))/(Math.PI/180)
but /(Math.PI/180) limits results from -90 to 90
i need 0-360
note: im using the angle to indicate direction:
0=up
90=right
135=45 degree right+down
180=down
270=left
e...
I have some js file generated with php., name by example "my_file.js.php", served with appropriate content-type for JS.
In FF, IE7, Chrome, etc.. all works fine, these files are correctly loaded.
But, in IE6, ths is more complicated :
- first load of the page : file is not loaded, and consequently, I have some JS errors on my page
- I...
hi,
i am using the rhino 1.7 javaScript engine in my project. i have implemented the debugger and debugFrame interfaces, and now i am getting to the public void onDebuggerStatement(Context cx) function.
how can i get from the context all the debug information that i need e.g. the list of variables and their value?
regards,
me :-)
...