What is the best way to embed data in html elements for later use?
As an example, let's say we have jQuery returning some JSON from the server, and we want to dump that datat out to the user as paragraphs. However, we want to be able to attach meta-data to these elements, so we can events for these later.
The way I tend to handle this...
Hi,
I have an asp.net web form with a couple of asp.net textbox controls:
<asp:TextBox ID="txtTextBox" runat="server" /> .
I have a javascript file tools.js that are included in the page:
<script src="tools.js" type="text/javascript"></script>
How can I access the value from txtTextBox from javascript?
Ive tried using
document.g...
i need to change something in my site, if some fields changed in database, but without reloading the page! but i have no idea how i can do it.
could you give me an idea? thanks
example:
for example, i have a forum, and i need to show a image, if new comment resieved! i can write all functions, but i don't understand when i must call ...
I need to Initialize a value in a Javascript by using a c# literal that makes reference to a Session Variable. I am using the following code
<script type="text/javascript" language="javascript" >
var myIndex = <%= !((Session["myIndex"]).Equals(null)||(Session["myIndex"]).Equals("")) ? Session["backgroundIndex"] : "1" %>;
However ...
Hi, is there a way with css or js to show the scrollbar of an element on the left instead of on the right? i don't need a crossbrowser way i need it only on Firefox.
...
Can anyone explain the meaning of this code?
if (data.result) {
$('ul#intlist').append(data.content);
}
...
I have created a Website Project in VS2010. My Controls are not rendered correctly. The JS that is produced is not correctly formatted. Here is an example:
protected void Page_PreRender(object sender, EventArgs e)
{
if (!IsPostBack)
{
objListBox.Attributes.Add("onchange", "Control_doPostBack('" + objL...
Hello all,
How do I get the id of an input element based on its value? The values will always be unique and there are only 7 of them. I have tried this:
$('#wrapper').find("input[value='"+value+"']").each(function(){
return this.id;
});
But nothing is returned!
Thanks all for any help
...
I'm trying to create a simple function, but at runtime firebug says the function does not exist.
Here's the function code:
<script type="text/javascript">
function load_qtip(apply_qtip_to) {
$(apply_qtip_to).each(function(){
$(this).qtip(
{
content: {
// Set the text to an image HTML string with the ...
I'm having some trouble translating my working C# regular expression into JavaScript's regular expression implementation.
Here's the regular expression:
([a-z]+)((\d+)([a-z]+))?,?
When used on "water2cups,flour4cups,salt2teaspoon" you should get:
[
["water", "2cups", "2", "cups"]
["flout", "4cups", "4", "cups"]
["salt", ...
I have attribute value as:
<div id = "2fComponents-2fPromotion-2f" class = "promotion">
Now I want to get only portion of it, say Promotion and its value 2f, how can I get this using jquery ? Do we have built in function for it ?
...
Hi
I'm looking for a straight forward list(with any notable information to match the point) of the separate processes involved from initiating the request object to the user seeing the end result in AJAX?
Thanks.
...
So ... The thing is, the code works in FireFox, no problems. But when I open the same page, it gives me the following error:
"Undefined is null or not an object."
But when I copy the code to a localhost page, it works fine.
Also when I clear my cache in IE it works, but only once, if I refresh after that one load, it gives me the same ...
I have created a nice multiresolution favicon.ico containing 16x16, 32x32, & 48x48 resolution icons. These load up all pretty-like within browsers or when the site is saved to the desktop.
However, the same image is also being used on the website (specifically, as an icon within a toolbar). Currently, the 16x16 icon is also saved as a p...
I'm styling a form with Jqtransform script.
The form includes a selector which enlist some cities, when i click a one, it should update the selector below it with some locations within that city.
here is the code of the selector
<select name="city" id="city" class="wide" onchange="populateDestrict(this)">
It was working fine with de...
When I try to pass the url value to the controller action, action is not getting the required value.
I'm sending the value like this:
function value(url,id)
{
alert(url);
document.getElementById('rating').innerHTML=id;
var params = 'artist='+id;
alert(params);
// var newurl='http://localhost/songs_full/public/eslres...
I have a JS file hosted on Amazon S3 (http://s3.amazonaws.com/wingify/vis_opt.js). I want the file to be cached on users' browsers so that they don't have to download it with every page view. However, in spite of setting Cache Control header I don't think it is getting cached. Browser still contacts Amazon Server with every pageview.
He...
Hello,
I am trying to make a form dynamic using mootools 1.11, for specific reasons I cannot upgrade atm.
I'm trying to manipulate a select field to have dynamic options. This works in Firefox & Chrome but not IE8. Hope there's a fix for this.
bits of the code:
myOptions(hrs+1, 23, 'uur');
$('vertrektijd_uur').setHTML('<option value=...
I'm developing a website, but I realized that, in addition to the link to my main javascript file, and the link to the jquery file, it's beginning to look like I'm going to have links to three or more plugins also.
I'm just wondering if this is good practice? The site I'm building is a web app, so I need a lot of functionality, but I don...
I want to give the user possibility to paste an image into a webform. I don't need to display the image, all I need is the image's location.
I know it's possible because the guys at CKEditor(and other editors) are doing it.
If you go here, http://ckeditor.com/demo and paste an image you copied and then right click on it and go to imag...