- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
40 Posted Topics
Re: Wonderland: The code in your first post in this thead seems to be correct, is it not working? | |
Re: I strongly recomand using mootools for this operation. It all becomes easy then. Try adding mootools and run this code: [code] window.addEvent('domready', function(){ var hl = $('homepageleft'); var hr = $('homepageright'); var hls = hl.getSize(); var hrs = hr.getSize(); var ns = Math.max(hrs.y, hls.y); hr.setStyle('height', ns); hl.setStyle('height', ns); }); [/code] … | |
I'm creating a xml-file from code using Linq to XML. The code is prety simple: [code=C#] XNamespace appvisumnamespace = XNamespace.Get("http://appvisum.com"); XDocument doc = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), new XComment(""), new XElement("AppConfig", new object[] { (from section in this select section.ToXml()) })); foreach (XElement e in doc.Root.DescendantsAndSelf()) { if (e.Name.Namespace … | |
I didn't realy know where to put this post, so please bear with me... I'm starting a new project with two friends of mine using github for code-hosting (and of cause git for version controll). Also I'm using lighthouse for bugtracking. Github has a nice and fully integrated post-receive hook … | |
Re: I'dd begin looking into some of the more popular JS frameworks like mootools or jquery for animation and simplification of AJAX. The things you want to tween is probably opacity, z-index and left and top coordinates. You'll also need to register onclick for the images to the left and the … | |
Re: [QUOTE=pritaeas;1056257]Yes, that is what I mean, although I am not sure if XmlHttpRequest is a good example.[/QUOTE] What do you mean XMLHttpRequest isn't a good example? XMLHttpRequest [u]IS[/u] Ajax, isn't it? | |
Re: [QUOTE=memory100;1049264]here is the question: 5. Write a basic program that allows the user to write names to a text file and read from the text file and displaying them on the screen. [CODE] string filename; StreamReader outputFile = new StreamReader("c:\\PriceList.txt"); // Read the first item. filename = outputFile.ReadLine(); // If … | |
Re: [code=JavaScript] this.reproduce = function(name) { prNumber += prNumber; window[name] = new cMicrobe(); } [/code] | |
Re: At clienthint.js, before line 30, try adding: [icode]alert(xmlhttp.responseText);[/icode] | |
Re: Using mootools I'd use this code: [code=JavaScript] window.addEvent('keydown', function(event) { var e = new Event(event); if(e.code == 116) { e.stop(); } }); [/code] This code has been tested to work under FF3.5 Event-handling on the web is always good to let a framework take care of because it's so different … | |
Re: Not shure using plain old JS. This works using mootools though: [code=JavaScript] $$('a').set('href', '#').addEvent('click', function() { $('spec').set('value', $(this).get('html')); }); [/code] | |
Re: This is actually pretty simple to achieve. What you need is a simple event-listener that listens to onchange of the text-box. If the textbox contains 5-chars, and their all numbers fire a ajax-request to a server to ask for the postal-address. The problem is that you need a db of … | |
Re: Do you want to after- or pre-load your models? This can be done in two ways you see, the first one is to wait for a user to select a brand, then request from the server what models exist for that brand, the other one is that you load all … | |
Re: [code] <html> <head> <title> My simple calculator </title> </head> <script language="JavaScript"> <!-- function addit = function() { var num1=document.getElementById('one').value; var num2=document.getElementById('two').value; document.getElementById('result').value=parseFloat(num1)+parseFloat(num2); } function minusit() { var num1=document.getElementById('one').value; var num2=document.getElementById('two').value; document.getElementById('result').value=parseFloat(num1)-parseFloat(num2); } --> </script> <body>Add subtract Calculator <form name="calform"> <p> First Number:<input type="text" name="one" id="one" maxlength="3" /> <p> Second Name:<input … | |
I'm trying to create a simple application that is only supposed to be called by other applications. I've taken the concept from linux where you often have a application that depends on another, and then it does api-calls to that other application. The example I'm thinking about is libnotify which … | |
Re: What you alternately can do is just to add mibbit's iframe-chat. It uses IRC, so you have to create and register a channel on a server that supports this, but it's not hard to do. This probably doesn't require any coding at all from you. | |
Re: [QUOTE=Kadjii;1048344]Hello again :) I am having a problem where I want to change a particular variable based on what parameters I send to a js function. In the code below, dnum is a number 1-6, and I want the global variable d1keep (or d2keep, d3keep etc.) to equal the dvalue. … | |
Re: Try changing line 9 to [icode]window.Show()[/icode] | |
Re: [QUOTE=ady_1;1048289]Hi, I'm new to this and have a quick question. I have a form called register.html and have javascript to check the form validation [CODE=html] <form <input type="submit" value="Submit" onClick="return formValidate()"> </form> [/CODE] so in register.html when user presses submit the formValidate method (javascript) is run. once it returns true, … | |
Re: This is probably caused by the variables[0] not being formatted as a float. To solve this you need to make sure that all the lines in the file actually contains "{float} {float}" on every single line. | |
Re: Let me see if I understand you correctly. First you want to read to a text-file to get and treat every line as a number (which you call a grade), am I correct? What I don't understand is where you get the number 24 from, but what I would do … | |
This is a simple code-snippet that can be used to parse dates with javascript. It's setup to use European dates (dd.mm.yyyy | dd/mm/yyyy | dd,mm,yyyy), but it can easily be setup to use american dates as well (mm/dd/yyyy etc), to do so simply replace "$1" with "$2" and "$2" with … | |
Re: Alternatly you could pop in img-tags where you want, but this tends to get messy. You could use javascript to fetch the correct column of the table and then simply insert a img. | |
Re: Give the text-field an id (if you haven't, I'll use myTextField), then try this: [icode]<a href="javascript.open('includes/func/search.php?id='+encodeURIComponent(document.getElementById('myTextField').value)));">...</a>[/icode] | |
Re: First of all, you're using MooTools, right? Then why on earth are you using GetXmlHttpRequest? MooTools has this builtin as [icode]var req = new Request(options);[/icode]. Second, the reason your code isn't working is probably because when your code gets to [icode]return newRate;[/icode] (line 17) there is no newRate variable defined. … | |
Re: [QUOTE=Jupiter 2;1042947] colspane = 3 A number is not enclosed in quotes as it is a number and not text.[/QUOTE] In case you're interested, this isn't necessarily correct. Actually, I think I recall that if you use XHTML you MUST enclose everything in quotes (even empty literals). Using [icode]<button disabled>test</button>[/icode] … | |
I get an error trying to parse som XML. The error is [icode]System.Xml.XmlException: Root element is missing..[/icode], and I can't understand why. Here is the code I run: [code=C#] MemoryStream xmlStream = new MemoryStream(); StreamWriter xmlStreamWriter = new StreamWriter(xmlStream); String xml = "<html>\n<body>\n\n<h1>My First Heading</h1>\n\n<p>My first paragraph.</p>\n\n</body>\n</html>"; xmlStreamWriter.Write(xml); xmlStreamWriter.Flush(); XmlReader … | |
Re: [QUOTE=futingkiller;1036981]ok, first of all i am not really sure what you want to do, but there is a event that occurs when you close the window.. and that is: [CODE]<BODY onUnload="function()"> [/CODE] [/QUOTE] Actually, this is not correct. There might bee a event named onunload (small-case is proffered after my … | |
Re: There are 2 ways to securely do this. The first one is to make the download dir inaccessible without password (this is as said done in htaccess e.l. and not in you code). The other one is to put the file outside of you public_html-folder (http_root o.l. it might be … | |
Re: In other words, you want to load content when someone clicks an image, was it? That's not that hard, but doing so in a blog which you do not control the server-scripting might be a pain. I don't event think it's possible to add scripts to those blogs-system (this is … | |
| |
| |
Re: Most common is a filehandle in your own app that hasn't been closed. | |
Re: If eb isn't a var, how on earth can you use it? | |
| |
Re: One small tips. Try using insertRow and insertCell instead (you're working with tables right?). [code=javascript] var t = document.createElement('table'); var row1 = t.insertRow(t.rows.length); var row2 = t.insertRow(t.rows.length); var cell1_1 = row1.insertCell(row1.cells.length); var cell1_2 = row1.insertCell(row1.cells.length); var cell2_1 = row2.insertCell(row2.cells.length); var cell2_2 = row2.insertCell(row2.cells.length); //This works on all browser (including IE … | |
Re: You go to mootools.net -> core builder. There you pick and mix and a special file is made for you with what components you select. | |
Re: Is the data seperated using only spaces and tabs? If so, try using string replacement (I don't know the phyton syntax) and replace every sequence of 1 or more tab or space-char with a tab-char. A regular expression might look something like this: [icode]([\t ]+)[/icode] | |
Re: Not shure why it dosn't work. But I'll give you one tip though. In stead of [CODE=JAVASCRIPT]$$('div.letters-title-bran').addEvent('mouseenter', function() { $$('div.letters-desc-bran').setStyle('visibility','visible'); $$('div.letters-desc-bran').fade('in'); }); $$('div.letters-title-bran').addEvent('mouseout', function(event) { $$('div.letters-desc-bran').fade('out'); });[/CODE] try writing [CODE=JAVASCRIPT]$$('div.letters-title-bran').each(function(item) { item.addEvents({ mouseenter: function() { var div_letters_desc_bran = $$('div.letters-desc-bran'); div_letters_desc_bran.setStyle('visibility','visible'); div_letters_desc_bran.fade('in'); }, mouseout: function() { $$('div.letters-desc-bran').fade('out'); } }); }); [/CODE] … | |
Re: I have no experience with jQuery, but used mootools quiet a lot. It's not just possible, but not even that hard. Php has the ability to send answers as json (use json_encode). Here is some pseudo-code for the serverscripting (note, this has not been tested): [code=php] <?php $username = $_POST['uName']; … |
The End.