Search Results

Search found 28881 results on 1156 pages for 'javascript is future'.

Page 63/1156 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Table data display in HTML

    - by Hulk
    In the following table how to adjust the height and width automatically for the table. i.e, if the data is more it should display all the data else present data ina fashionable manner <table="mytable"> <tr><td>more data.............................................................................</td> <td>a</td> </tr> In the nothing should be wrapped wither in case of large chuks of data or small chunks of data. Thanks....

    Read the article

  • Preventing focus on next form element after showing alert using JQuery

    - by digitalsanctum
    I have some text inputs which I'm validating when a user tabs to the next one. I would like the focus to stay on a problematic input after showing an alert. I can't seem to nail down the correct syntax to have JQuery do this. Instead the following code shows the alert then focuses on the next text input. How can I prevent tabbing to the next element after showing an alert? $('input.IosOverrideTextBox').bind({ blur: function(e) { var val = $(this).val(); if (val.length == 0) return; var pval = parseTicks(val); if (isNaN(pval) || pval == 0.0) { alert("Invalid override: " + val); return false; } }, focus: function() { $(this).select(); } });

    Read the article

  • Word on HTML document point, using UIWebView, DOM and Javascript

    - by leolobato
    Hey guys, How can I figure out which word is at the point where the user tapped on a UIWebView? I am able to detect the CGPoint for the tap (subclassing UIWindow like this), and I can actually get the DOM element on that point using javascript. But I know very little of javascript and DOM to figure out how can I actually get which word the user tapped on. Is that possible? Here's what I have right now: int scrollPosition = [[webView stringByEvaluatingJavaScriptFromString:@"window.pageYOffset"] intValue]; NSString *js = [NSString stringWithFormat:@"document.elementFromPoint(%f, %f).tagName", point.x, point.y+scrollPosition]; NSString *value = [webView stringByEvaluatingJavaScriptFromString:js]; NSLog(@"element: %@", value);

    Read the article

  • javascript change innerhtml

    - by David
    ok im new at javascript, but im trying to change the innerhtml of a div tag, heres my script and its not working: <head> <script type="text/javascript"> function var1() { document.getElementById('test').innerHTML = 'hi'; } window.onLoad = var1(); </script> </head> <body> <div id="test">change</div> </body> it should work but for some reason its not, any help?

    Read the article

  • Debugging JavaScript in Internet Explorer

    - by Erik W
    I am working on a relatively complex JavaScript-driven website. It runs great in all browsers except Internet Explorer. I am getting this very curious error: "A Runtime Error has occurred. Do you wish to Debug? Line: 93,865,600. Error: Expected ';'" The issue is, I don't have 93 million lines of code, and clicking "Yes" doesn't attach to Visual Studio like it normally does. I can click on 'No' and the website continues to run fine, but if a user doesn't have JavaScript debugging disabled, I don't want them to see this meaningless error. Suggestions/Tools/Plugins to get to the bottom of this? And yeah, I learned my lesson, switch over and check my project in Internet Explorer more often... Thanks,

    Read the article

  • If you delete a DOM element, do any events that started with that element continue to bubble?

    - by Matt
    What behavior should I expect if I delete a DOM element that was used to start an event bubble, or whose child started the event bubble - will it continue to bubble if the element is removed? For example - lets say you have a table, and want to detect click events on the table cells. Another piece of JS has executed an AJAX request that will eventually replace the table, in full, once the request is complete. What happens if I click the table, and immediately after the table gets replaced by a successful completion of an AJAX request? I ask because I am seeing some behavior where the click events don't seem to be bubbling - but it is hard to duplicate. I am watching the event on a parent element of the table (instead of attaching the event to every TD), and it just doesn't seem to reach it sometimes.

    Read the article

  • How to extract a specific input field value from external webpage using Javascript

    - by Tom
    Hi, i get the webpage content from an external website using ajax but now i want a function which extract a specific input field value which is already autofilled. the webpage content is like this: ......... <input name="fullname" id="fullname" size="20" value="David Smith" type="text"> <input name="age" id="age" size="2" value="32" type="text"> <input name="income" id="income" size="20" value="22000$" type="text"> ......... I only want to get the value of fullname, maybe with some javascript regex, or some jQuery dom parser, i know i can do it easily with php but i want it using Javascript or jQuery. Note: this inputs are not hosted in my page, they are just pulled from other website through Ajax. Thanks

    Read the article

  • How to call c# server side method through javascript

    - by Nimesh
    Hi, I need to call a c# server method through the javascript. I have a gridview in which i have a column with dropdown list. When i change the dropdown's value i need to call a server side method through javascript and change the value of another text box in the gridview. I am able to do this on the selected index change. but i am slightly worried about the performance. i am using asp.net c#. Please let me know how to do this.

    Read the article

  • Simple string encryption in .NET and Javascript

    - by jonathanconway
    I'm developing an ASP.NET MVC application in which I want to encrypt a short string on the server, using C#, and send it to the client-side. Then on the client-side it will be decrypted through Javascript code. Any thoughts on how to implement this? Do you know of a simple encryption algorithm (doesn't have to be bullet-proof secure) that can be easily translated from C# to Javascript or vice-versa? NOTE: I could do this entirely in C# and do the decryption through Ajax, but I'd prefer not to do it this way, as I want to reduce website traffic as much as possible.

    Read the article

  • AJAX Issue, Works in all browsers except IE

    - by Nik
    Alright, this code works in Chrome and FF, but not IE (which is to be expected). Does anyone see anything wrong with this code that would render it useless in IE? var waittime=400; chatmsg = document.getElementById("chatmsg"); room = document.getElementById("roomid").value; sessid = document.getElementById("sessid").value; chatmsg.focus() document.getElementById("chatwindow").innerHTML = "loading..."; document.getElementById("userwindow").innerHTML = "Loading User List..."; var xmlhttp = false; var xmlhttp2 = false; var xmlhttp3 = false; function ajax_read() { if(window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); if(xmlhttp.overrideMimeType){ xmlhttp.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4) { document.getElementById("chatwindow").innerHTML = xmlhttp.responseText; setTimeout("ajax_read()", waittime); } } xmlhttp.open('GET','methods.php?method=r&room=' + room +'',true); xmlhttp.send(null); } function user_read() { if(window.XMLHttpRequest){ xmlhttp3=new XMLHttpRequest(); if(xmlhttp3.overrideMimeType){ xmlhttp3.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp3=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp3) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp3.onreadystatechange = function() { if (xmlhttp3.readyState==4) { document.getElementById("userwindow").innerHTML = xmlhttp3.responseText; setTimeout("user_read()", 10000); } } xmlhttp3.open('GET','methods.php?method=u&room=' + room +'',true); xmlhttp3.send(null); } function ajax_write(url){ if(window.XMLHttpRequest){ xmlhttp2=new XMLHttpRequest(); if(xmlhttp2.overrideMimeType){ xmlhttp2.overrideMimeType('text/xml'); } } else if(window.ActiveXObject){ try{ xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try{ xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ } } } if(!xmlhttp2) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } xmlhttp2.open('GET',url,true); xmlhttp2.send(null); } function submit_msg(){ nick = document.getElementById("chatnick").value; msg = document.getElementById("chatmsg").value; document.getElementById("chatmsg").value = ""; ajax_write("methods.php?method=w&m=" + msg + "&n=" + nick + "&room=" + room + "&sessid=" + sessid + ""); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } var intUpdate = setTimeout("ajax_read()", waittime); var intUpdate = setTimeout("user_read()", 0);

    Read the article

  • dropdowllist selected item from javascript to servlet

    - by kawtousse
    Hi, I am writing to ask if anybody knows, is it possible to get the value from a JavaScript variable and use this value in a Java Servlet? I have read up on this but all i have found is getting the JavaScript value through a form submit. What I need is: I have a html select combo box. I need to extract the selected value from this and use this value to query a database. Is this possible. Thanks in advance.

    Read the article

  • Extend a direct instance

    - by Diolor
    We have a new instance of an object with four properties: person={firstname:"John",lastname:"Doe",age:50,eyecolor:"blue"}; What is the best way to many other properties to that object? If we wanted few couple more sure we would: person[address_no] = 4; .... person[country] = 'Netherlands'; But what if we have a lot properties. Is there any minimalistic way like the one below? (I know it doesn't work) person +={address_no: '4', .... , country: 'Netherlands'};

    Read the article

  • jQuery attach function to 'load' event of an element

    - by Miguel Ping
    Hi, I want to attach a function to a jQuery element that fires whenever the element is added to the page. I've tried the following, but it didn't work: var el = jQuery('<h1>HI HI HI</H1>'); el.one('load', function(e) { window.alert('loaded'); }); jQuery('body').append(el); What I really want to do is to guarantee that another jQuery function that is expecting some #id to be at the page don't fail, so I want to call that function whenever my element is loaded in the page. To clarify, I am passing the el element to another library (in this case it's a movie player but it could be anything else) and I want to know when the el element is being added to the page, whether its my movie player code that it is adding the element or anyting else.

    Read the article

  • Html5 - Callback when media is ready on iPad wont work

    - by Kap
    I'm trying to add a callback to a HTML5 audio element on an iPad. I added an eventlistener to the element, the myOtherThing() starts but there is no sound. If I pause and the play the sound again the audio starts. This works in chrome. Does anyone have an idea how I can do this? myAudioElement.src = "path_to_file"; addEventListener("canplay", function(){ myAudioElement.play(); myOtherThing.start(); }); SOLVED Just wanted to share my solution here, just in case someone else needs it. As far as I understand the iPad does not trigger any events without user interactions. So to be able to use "canply", "playing" and all the other events you need to use the built in media controller. Once you press play in that controller, the events gets triggered. After that you can use your custom interface.

    Read the article

  • JavaScript "confirm" on SelectedIndexChange of RadioButtonList

    - by Brian David Berman
    I have a RadioButtonList control and I would like to do a Javascript "confirm" when a user tries to change the index. Currently AutoPostBack is set to TRUE. I can, of course, just call __doPostBack from within a javascript function, etc. I tried a few things with jQuery but you have to worry about mousedown vs. click and then there is always the fact that you can click the checkbox label to select it, etc. Anyone have a nice solution for this? To be clear, I am looking for a way to prompt the user with a confirm box prior to their selection being made and triggering a postback.

    Read the article

  • Change color of a table cell using javascript using dropdown menu

    - by Mike Burzycki
    I'd like to use some javascript code to change the background color of a single cell within a table. I have some code below which allows me to change the page background color. This is similar in concept to what I would like to do, but I would really like to be able to change just one cell...not the whole page. I have thought about making the rest of the cell borders and background colors white, leaving the cell I want to manipulate transparent, but I think this probably a brute force method that will cause me trouble down the road. Does anyone have any advice to do this with javascript? The page background color changing code is here: <form name="bgcolorForm">Try it now: <select onChange="if(this.selectedIndex!=0) document.bgColor=this.options[this.selectedIndex].value"> <option value="choose">set background color <option value="FFFFCC">light yellow <option value="CCFFFF">light blue <option value="CCFFCC">light green <option value="CCCCCC">gray <option value="FFFFFF">white </select></form> Thanks for the help, Mike

    Read the article

  • Open a chrome tab from delayed javascript window.open

    - by jettero
    When I window.open("http://blarg") in chrome, I get a new tab. If I delay the open, say using a jquery $(hrm).animate({},5e3,function(){window.open(url)); it opens the url in a new window with no status bar, etc — if I give it permission to pop-up that is. I'm looking for a way to get the instant behavior, that is, I wish to open a URL after an animation, but still in a new tab. I imagine I could get by with learning a way to instruct chrome to never ever open pop-ups and to always open them in tabs (I imagine there's a webkit setting, why it's not a built in is a mystery); but I'd rather try to find a way to do it from the javascript if possible. I somewhat doubt there's any way to do this though. I'm not aware of any javascript that's tab-aware.

    Read the article

  • How can I return a link to an active state after mouseout?

    - by Craig
    var menuEnter = { 'color': hoverColor}; var menuLeave = { 'color': 'C0C0C0'}; new ('div#menu a.level1 span.bg', menuEnter, menuLeave, { transition: Fx.Transitions.linear, duration: 200 }, { transition: Fx.Transitions.sineIn, duration: 500 }); I would like the active menu color to not be affected by the mouseleave var. Thank you.

    Read the article

  • Javascript: Can't control parent of descendant nodes.

    - by .phjasper
    I'm creating elements (level 1) dynamically which in turn create elements (level 2) themselves. However, the children of level 2 elements have "body" as their parent. In the HTML code below, the content if spotAd2 is created by my function createNode(). It's a Google Ad Sense tag. However, the Google Ad Sense tag create elements that went directly under "body". I need them to by under spotAd2. function createNode( t, // type. tn, // if type is element, tag name. a, // if type is element, attributes. v, // node value or text content p, // parent f ) // whether to make dist the first child or not. { n = null; switch( t ) { case "element": n = document.createElement( tn ); if( a ) { for( k in a ) { n.setAttribute( k, a[ k ] ); } } break; case "text": case "cdata_section": case "comment": n = document.createTextNode(v); break; } if ( p ) { if( f ) { p.insertBefore( n, p.firstChild ); } else { p.appendChild( n ); } } return n; } spotAd2 = document.getElementById("spotAd2"); n1 = createNode("element", "div", {"id":"tnDiv1"}, "\n" , null, true); n2 = createNode("element", "script", {"type":"text\/javascript"}, "\n" , n1, false); n3 = createNode("comment", "", null, "\n" + "google_ad_client = \"pub-0321943928525350\";\n" + "/* 728x90 (main top) */\n" + "google_ad_slot = \"2783893649\";\n" + "google_ad_width = 728;\n" + "google_ad_height = 90;\n" + "//\n" , n2, false); n4 = createNode("element", "script", {"type":"text\/javascript","src":"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js"}, "\n" , n1, false); --- Result: <body> <table cellspacing="2" cellpadding="2" border="1"> <tbody><tr> <td>Oel ngati kemeie</td> <td>Kamakto niwin</td> </tr> <tr> <td>The ad:</td> <td> <div id="spotAd2"> <!-- Created by createNode() --> <div id="tnDiv1"> <script type="text/javascript"> google_ad_client = "pub-0321943928525350"; /* 728x90 (main top) */ google_ad_slot = "2783893649"; google_ad_width = 728; google_ad_height = 90; </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> </div> <!-- Created by createNode() --> </div> </td> </tr> <tr> <td>txopu ra'a tsi, tsamsiyu</td> <td>teyrakup skxawng</td> </tr> </tbody></table> <!-- Created by adsense tag, need these to be under tnDiv1 --> <script src="http://pagead2.googlesyndication.com/pagead/expansion_embed.js"></script> <script src="http://googleads.g.doubleclick.net/pagead/test_domain.js"></script> <script>google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);</script> <ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: 90px; position: relative; visibility: visible; width: 728px;"> <ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: 90px; position: relative; visibility: visible; width: 728px;"> <iframe width="728" scrolling="no" height="90" frameborder="0" vspace="0" style="left: 0pt; position: absolute; top: 0pt;" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-0321943928525350&amp;output=html&amp;h=90&amp;slotname=2783893649&amp;w=728&amp;lmt=1273708979&amp;flash=10.0.45&amp;url=http%3A%2F%2Fkenshin.katanatechworks.com%2Ftest%2FadsBrowserSide.php&amp;dt=1273708980294&amp;shv=r20100422&amp;correlator=1273708980298&amp;frm=0&amp;ga_vid=695691836.1273708981&amp;ga_sid=1273708981&amp;ga_hid=1961182006&amp;ga_fc=0&amp;u_tz=480&amp;u_his=2&amp;u_java=1&amp;u_h=1080&amp;u_w=1920&amp;u_ah=1052&amp;u_aw=1920&amp;u_cd=24&amp;u_nplug=5&amp;u_nmime=38&amp;biw=1394&amp;bih=324&amp;fu=0&amp;ifi=1&amp;dtd=955&amp;xpc=Jl67G4xiq6&amp;p=http%3A//kenshin.katanatechworks.com" name="google_ads_frame" marginwidth="0" marginheight="0" id="google_ads_frame1" hspace="0" allowtransparency="true"> </iframe> </ins> </ins> <!-- Created by adsense tag, need these to be under tnDiv1 --> </body>

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >