I am working in JavaScript coding. I have created a text area with name OQ_0 and value "0". When i use eval() method for that field in JavaScript it is giving the value undefined. The below are the part of JavaScript code
var tempOpenQtyStr = "document.InitiateReturnsForm.OQ" + "_" + 0;
var tempOpenxQtyStr = eval(tempOpenQtyStr).value;...
I am testing on providing insert HTML option in WYSIWYG editor.
I tried inserting div into the editor.
After inserting IE seems to get the cursor out of the div this is what I want but FF the cursor is still in the div. How to make the cursor get out of the div?
...
I'm writing a page with several text fields and a drop down. The fields in the drop down affect the value of the text fields.
For example: the drop down options are "a" and "b". The text fields are "name" and "last name". When choosing "a", "name" is filled with "Joe". When choosing "b", "name" is filled with "Bob".
I've written a class...
I'm populating select box options via jquery and json but I'm not sure how to address multiple instances of the same chained select boxes within my form.
Because the select boxes are only rendered when needed some records will have ten sets of chained select boxes and others will only need one. How does one generate unique selects to s...
Hi everyone,
I want to have a feature to submit several forms on a page when the user leaves the page. There is this "do you wanna save?" question and my code so far is like this:
function checkForChanges( ) {
if (window.formform1Changed == true) {
if (window.asked == false) {
window.asked=true;
doSave = confirm("Wann...
In an application that has multiple webviews, is there any way to have the JavaScript in two separate webviews communicate with each other directly? I would really like to use JavaScript in one webview to control the contents of the other webview, but my bet is that each environment is completely isolated and that communication has to be...
I am working on a php that application that uses ajax. On all the links where i want to get the link hijacked by jQuery I add the class ajaxlink directly into the link
<a class="someclass ajaxlink" href="somelocation1">goto1</a>
<a class="someclass ajaxlink" href="somelocation2">goto2</a>
<a class="someclass ajaxlink" href="somelocation...
Currently I am developing a web application for which I am using a preloader icon. What I want is that the preloader becomes visible every time the user navigates to another page or refreshes the page. So far I have the following solution:
window.onbeforeunload = function() { $("applicationdisabler").show(); };
For Safari and Firefox ...
I would like to observe changes in multiple form fields and make a call back to the server with the combined values. The fields I want to observe are select boxs.
Do I do this by firing the "onchange" event of the parent element?
I'm using Prototype 1.6.
...
my javascript is not validating
<script type="text/javascript">
function checkname()
{
var str1=document.form.name.value
if (str1.length==0)
{
return true
}
else{
alert('Please Enter Your Name!')
return false
}
}
function checkrollno()
...
I have ran into an interesting issue while trying to create a more usable datepicker-like interface. I am using a slider to change the month of a listed calendar (Mar 2010, Apr 2010, May 2010, etc.) A very simple mock-up here:
http://dev.primestudiosllc.com/riverbank/
I will need to first get the current month and set that as the begin...
I'm new to javascript :
I use window.getSelection() to get a string . But it returns an object.
var text = '';
text = document.getSelection();
alert(typeof(text)); // << it returns object
...
Hi all,
JavaScript is not my strong point, but then I'm not sure I'm hitting this from the right direction.
Firstly, I have some XSLT which produces HTML tables with event information in them. I assign a numerical ID to each table which matches the XSL position().
What I want to achieve is to show only the first 10 tables, until the u...
I have some javascript which catches changes to a form then calls the form's regular submit function. The form is a GET form (for a search) and i have lots of empty attributes come through in the params. What i'd like to do is to delete any empty attributes before submitting, to get a cleaner url: for example, if someone changes the '...
Possible Duplicates:
Storing arbitrary info in HTML tags for JavaScript?
What are the concrete risks of using custom HTML attributes?
Custom attributes - Yay or nay?
What are the drawbacks of adding a custom attribute on a standard HTML element?
For example:
<intput type="textbox" id="MyId" MyCustomeAttribute="MyData" />
B...
I'm using fusioncharts free and creating some 3d pie charts like so...
<div style="margin:0 auto;" id="chart1Adiv">FusionCharts</div>
<script language="JavaScript">
var chart1A = new FusionCharts("./fusion_charts/FCF_Pie3D.swf","chart1Adiv","300","200");
chart1A.setDataXML("<graph caption='1A' bgColor='ffffff' decimalPrecision='0' s...
Is there a difference in performance (I am not asking about readability) if I condense my code into one line versus two?
For example:
var slide = 'images/' + n + '.png';
$('img').attr('src',slide);
versus
$('img').attr('src','images/' + n + '.png');
Personally, I like fewer lines of code. Often, I am the only one reading my co...
I have videos playing on a new window using the video tag in HTML5. I want the size of this new window to change depending on the height and width of the video that is being played. Is there some way to do this? I am using GWT by the way.
...
<p title="The test paragraph">This is a sample of some <b>HTML you might<br>have</b> in your document</p>
txt=document.getElementsByTagName("p")[0].childNodes[0].nodeValue;
alert("<p>The text from the intro paragraph: " + txt + "</p>");
it doesn't work.
How can I get the childNodes.nodevalue "This is a sample of some HTML you might ...
Hello,
I'm having trouble getting JQuery to load in IE7, works fine in all other browsers, firefox,safari,opera,ie8 just not in IE7.
If anybody has any sort of idea why, please do let me know.
Many Thanks,
Q
This is before the
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/plugins.js" type="text/java...