I dynamically assign a textbox value in JavaScript:
var html = '';
for( var s=0; s++ ; s<10){
html += '<input type="hidden" name="hfstepDescription'+s+'" id="hfstepDescription'+s+'" value="'+ sstepDescriptionHTML +'">';
}
sstepDescriptionHTML's conntent may like this
<input type="hidden" name="hfstepDescription11" id="hfstepDescr...
Has anyone ever worked with a system of passing back say, some JSON data and using a javascript routine to generate the HTML to save on bandwidth?
What methods are there and are there any templating systems available?
...
I am having a file upload control in my page.
I want to get the full path of the uploaded file by javascript.
i have written
document.getElmentById('fileControl").value;
It is showing the full path in IE but in mozilla 3.5 it is showing only the filename not the path.
So how to solve this problem ?
...
I am trying to add a calendar date select when a user presses a button. The following code works in my partial.html.erb file:
<%= calendar_date_select_tag "due_date[#{i}]",nil,:popup=>:force,:year_range => 0.years.ago..5.years.from_now,:style=>'width:120px;'%>
But when I try to add the same code in my javascript as:
var cell3 = new_r...
In my project in one of the page I am creating a checkbox and doing some server side task when the checkbox check changes. What I want is to show a confirm message before going to the code behind.
If I am calling the javascript function then it is returning true/false(onclick event) but not going inside CheckboxCheckChanged.
I want the...
First my code
$.getJSON("./posts/vote/" + postId + "/1", null, function(result) {
if (result.result == true)
$("#pst" + postId + " > .pstside > .rank > .score").html(result.voteCount);
});
I have a bunch of buttons each with code which brings some voting results from an ASP.Net MVC controller action.
This works well the fir...
Hello All,
I'm having some issues while displaying a 'Base64' encoded image in my AIR application.
I'm fetching an image, which is 'Base64' encoded string, in a XML through a web service. At application side I'm able to decode it, but its not been able to display the image on the fly. A little search on Google gave me various result, ...
I am using jQuery 1.3.2.
There is an input field in a form.
Clicking on the input field opens a div as a dropdown. The div contains a list of items. As the list size is large there is a vertical scrollbar in the div.
To close the dropdown when clicked outside, there is a blur event on the input field.
Now the problem is:
In chr...
Hey everyone,
I know there is this post, but I still want to know more and learn from other ppl that have a lot more experience than I do.
So I was wondering what CSS-features or Javascript-functions or anything else I am not thinking of right now do not work in IE6+ or have you experience to not work with IE6+? And maybe you have a hac...
I'd like to know if it's possible to get the mac adress of a client with a javascript, It would be a good way to securise web-app. (eg. Limit one license p/ Mac Adress)
...
How can i call a jQuery function from javascript?
//jquery
$(function() {
function my_fun(){
/.. some operations ../
}
});
//just js
function js_fun () {
my_fun(); //== call jquery function
}
...
Suppose I have the following object in javascript:
var object = {"key1":"value1","key2","value2","key3","value3"};
How do I find out how many tuples I have in the dictionary?
...
I am using dynamical loading in treeview, however I want it to load children nodes when click the plus icon instead of clicking label, I tried to override lableClick event and preventDefault event, but it didn't work, yui still load the children node when I clicked label
tree.subscribe("labelClick", function(e) {
YAHOO.util.Event.pr...
I want to author an anchor tag that executes some javascript and then proceeds to go wherever the href was taking it. Invoking a function that executes my JS and then sets window.location or top.location to the href location doesn't work for me.
So, imagine I have an element with id "Foo" on the page. I want to author an anchor similar ...
I have a table, where i have a click event on the tr:
<tr id="<%= candidate.AnsogerID %>" class="newCandidatesTableTr">
, this click event:
$(".newCandidatesTableTr").click(function(e) {
works just fine, but in the row i also have a click event on a td:
$(".insertCandidate").live("click", (function(e) {
and this conflicts eachot...
Hi, I'm kind of stuck because I can get JavaScript to send a message to a Java applet. I can get it to work the other way round. Does anyone know a proper way to do this that works everywhere?
...
Hey!
I am cheating a bit with iFrames to create an illusion of AJAX-uploading. When the upload is complete I need to communicate information about the file that was uploaded to the main frame and list it.
If I have the following UL in the main frame and a JS-variable in the iFrame named filename, how can I append file_name to the list?...
Hi, this is the continuation of my previous question. Since I just logged in that day without an Open Id, I don't know how to login to that account and edit further. So I created a new Open Id enabled account and posted this as a new question.
Now I have the code like this. Inside the onclick event, the value is stored in the $selected...
This used to work, but for some reason it doesn't anymore. I use a javascript to change the source of an iframe and then refresh it. The reason is I want to send a variable into the iframe before it is viewed.
I added som debug code, and it shows "debug 1" but not "debug 2".
What might be the issue?
$("#upload_iframe").attr("src", "/e...
I am writing a web application that has a static outer "shell" and a dynamic content section. The dynamic content section has many updates as users navigate the system. When a new content block is loaded, it may also optionally load another JavaScript file. In the name of good housekeeping, I remove script blocks from the DOM that app...