3,892 Posted Topics
Re: A comprehensive [URL="http://www.quirksmode.org/js/cookies.html"]guide [/URL]to handling javascript cookies. | |
Re: > some use className as i am aware Almost all browsers out there support className. IE doesn't play well with setAttribute so it's wise not to use it. > document.framename.location = 'url'; IFrames don't have a property named as location. Use the src property instead. | |
Re: [ICODE]var acc = document.getElementById('accept')[/ICODE] assigns the reference of the checkbox element of your form to acc. Checkboxes have a property [ICODE]checked[/ICODE] which determines whether a checkbox is checked or not. Thus [ICODE]!acc.checked[/ICODE] means 'when checkbox is not checked'. | |
Re: Though that works, it's an incorrect way of doing things. The [ICODE]location[/ICODE] property of the global object [ICODE]window[/ICODE] is an object and not a string. What you need to do here is set the [ICODE]href[/ICODE] attribute or property of the location object. And BTW, no need to prepend it with … | |
Re: Look into the [URL="http://commons.apache.org/fileupload/"]Apache File Upload[/URL] module to ease the task of file uploads. | |
Re: > pic1.src="http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9886"; AFICT, the src attribute requires an absolute image path. In other words, it requires an URL and not an URI. From what I can see, you are trying to send a request to the server with some given parameters which would after required processing would return an image … | |
Re: You are probably missing an ending brace }. Try to pair the braces properly and you would be good to go. And by the way, learn to format your code so that simple mistakes like these never occur or get a better text editor in case your current one doesn't … | |
Re: >price = document.forms.nameOfForm.total_price.value; Incorrect way of accessing form elements. Each form object has an 'elements' host object which has all the form elements as it's properties. Correct way would be: [inlinecode]price = document.forms['nameOfForm'].elements['total_price'].value;[/inlinecode] | |
Re: [quote=Infarction;288053]I blame you if I do poorly of my finals tomorrow :p highest so far: [URL="http://students.washington.edu/jhlewis/bellshigh.png"]1663630[/URL][/quote] Damn...you really must be crazy man..I got only till 13k in my first attempt. God save your final exam scores...:D | |
Re: There are some fundamental problems with your program structure. You seem to be doing password validation in 'Password.java' itself and that too in the main method which isn't such a good idea. Plus your 'Record.java' file is never used. A simple way would be to create a new file 'Main.java' … | |
Re: [URL="http://www.w3schools.com/php/php_ajax_database.asp"]This[/URL] example does exactly what you want. Also try to read a few links from [URL="http://www.google.com/search?q=ajax+and+php&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a"]this[/URL] page if you plan on some serious stuff with possibly a good book by your side. | |
Re: > [icode]document.link1.className = 'sel';[/icode] The way you are using to access the link element is incorrect. The document object doesn't have a property named 'link1', it has a link element having an id of 'link1'. The correct way of doing things would be: [code] var e = document.getElementById('link1'); e.className = … | |
Re: Reading [URL="http://www.daniweb.com/techtalkforums/thread78292.html"]this[/URL] thread thoroughly might give you some link... | |
Re: No, since the confirm window is browser specific and not open to customizations. Your best bet would be to use some rich Javascript library like [URL="http://developer.yahoo.com/yui/examples/container/simpledialog-quickstart.html"]YUI (Yahoo! User Interface)[/URL] to pop up custom alert and confirm boxes. | |
Re: > However there's this one page that I changed with fontWeight that doesn't work. Doesn't work is not a nice way to describe your problem. What exactly happens? Are there any javascript errors? Try opening the same page in Firefox and see if there is anything informative in the error … | |
Re: [URL="http://www.google.com/search?q=back+button+in+ajax&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a"]Many people[/URL] have already contributed a lot to this subject. | |
Re: Are you using some sort of Javascript library? If yes, then you are better off asking this question in the respective forums since it might be more of a library issue. | |
Re: You only/always free the memory which you explicitly allocated. If you dynamically allocate memory for a struct variable, you need to explicitly free it even though the members it contains follow the automatic memory allocation scheme. If your struct contains instances of other structs which in turn are dynamically allocated, … | |
Re: > at url [url]http://lowellbonnell.ca/index.php?view=Markets[/url] my ajax will only work if you insert the > www in firefox. IE is fine either way. This is because the browser thinks you are trying to do [URL="http://www.owasp.org/index.php/Cross_Site_Scripting"]XSS[/URL]. | |
Re: > You and I don't take drugs not because the goverment prohibit it, > nor because is expensive or hard to find. But considering the fact that once these things get legalized, it won't be long before everyone starts taking it. Remember, the people around you influence you; evil is … | |
Re: What exactly is your problem, compilation error, runtime error ? Post your errors or detail the things which occur when you run your code. | |
Re: First validate your document against your DOCTYPE [URL="http://validator.w3.org/"]here[/URL], do away with the issues which the validator spits out and then repost. I guess this is the second time I would be telling you that <html /> is incorrect. The validator ought to tell you a lot about your code. | |
Re: The prompt function returns a string. The switch construct and so also your calculations requires product be a numeric value. Convert the user input returned to a number before using it. [code] do { product = Number(prompt("Enter something")); if(isNaN(product)) product = -1; switch(product) { case 1: price = 1.0; break; … | |
Re: That message is shown only when Javascript is executed locally and that too only on IE7. No such message would be displayed to the user once you site goes online, be rest assured. | |
Re: All browsers come with a built in XML parser which can be used to load XML files which can then be accessed using DOM. Read [URL="http://www.w3schools.com/xml/xml_parser.asp"]this[/URL] for reading local XML files. | |
Re: Instead of looping over the entire array to display it's contents, a clever way would be to convert it to a list and display it using it's toString() method (called implicitly). [inlinecode]System.out.println(Arrays.asList(myArray));[/inlinecode] | |
Re: I guess that's the way Firefox by default displays the unordered list elements. Your best bet would be to use some other style for your unordered list elements. Something like: [code] ul { list-style-type: circle; } /* or */ ul { list-style-type: square; } [/code] | |
Re: You people are getting confused between newline and carriage returns. A carriage return is just a carriage return and is always '\r'. It's the 'newline' character which is different on different systems. (\r, \n, \r\n) | |
Re: A simple script to give you something to chew on: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Test Page</title> <script type="text/javascript"> function doChange(srcE, targetId) { var val = srcE.options[srcE.selectedIndex].value; var targetE = document.getElementById(targetId); alert(val); removeAll(targetE); if(val == 'languages') { addOption('C++', targetE); addOption('Java', targetE); addOption('Scheme', targetE); } … | |
Re: Some points: [LIST] [*]Why are you treating head and body tags as having a empty content model by writing them as <head /> and <body />? It's incorrect. [*]You are having one too many double quotes in your onclick handlers. onclick="updateString"('+')" should be onclick="updateString('+')" [*]Placing alert's all over your code … | |
Re: [quote=n.aggel;290226]I ve been told for a sleep function but i can't find any info about it....Any thoughts on how i should implement this method?[/quote] If you are using Linux, then [URL="http://www.opengroup.org/onlinepubs/000095399/functions/sleep.html"]this[/URL] for sleep and if you are using windows then [URL="http://www.cs.rpi.edu/%7Eingallsr/OS/win32/sleep.html"]this[/URL]. [quote]also is there any way to read the system … | |
Re: Use the replace function or the href property of the location object to do the same. [code] if (document.input.password.value == p + a + s + e) { /* assuming the the file resides on the same path */ location.replace('gmtv.html'); /* or use location.href = 'gmtv.html' */ } else { … | |
Re: > I'm a programming newbie starting to study VB and, like many others, I wonder if this > is the best language to learn. Absolutely no. There are better languages out there like Java, Python etc. > then I could judge the capabilities of each and decide which is right … | |
Re: Engines are software modules (normally standalone) which perform a core functionality. Its not just the game engine, there are others namely Physics Engine (dealing with friction, viscosity etc), Sound Engine (playing sounds), AI Engine (managing the AI part of the game). Normally you won't get to see most of these … | |
Re: Look into the add() method which belongs to the 'HTMLSelectElement' for adding options to a select element. [url]http://www.w3schools.com/htmldom/met_select_add.asp[/url] [URL]http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-14493106[/URL] [URL]http://msdn2.microsoft.com/en-us/library/ms535921.aspx[/URL] | |
Re: I am sure that these kids have no choice considering it's the Universities which force them to use ancient compilers and libraries. A real pity. | |
Re: A simple [URL="http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=CdO&q=cookies+to+store+visits+javascript&btnG=Search"]google search[/URL] gave a lot of results. Be sure to try a few of them and if you still don't get it, post a problems. | |
Re: No, javascript on the client machine can't and is not made to read files on the server. It's a client side language though it can be very well used on your server (that would be something rare). To pass values from your server variables to javascript, you would need to … | |
Re: You can't. It's implementation defined. Each browser has it's own way of showing the alert box though the presence of 'external skins' installed for that browser may change the appearance of the alert box but other than that, you have no control whatsoever. Your best bet would be to use … | |
Re: The [URL="http://www.google.com/search?q=flash+tutorial"]search results[/URL] provided by Google were pretty helpful... | |
Re: Not possible on the client side, you would have to use server side routines to preserve the values entered by the user once the form has been submitted. | |
Re: [inlinecode]s = fso.CreateFolder("C:\Documents and Settings\Default\Desktop\test.txt", true);[/inlinecode] has incorrect escaping. You need to escape the \ character. Do something like [inlinecode]s = fso.CreateFolder("C:\\Documents and Settings\\Default\\Desktop\\test.txt", true);[/inlinecode] though this is not a recommended approach. Replace [inlinecode]window.location = "Alex_main.html"; [/inlinecode] with [inlinecode]window.location.replace("Alex_main.html");[/inlinecode] assuming that the file resides on the same path as that … | |
Re: Take a look at the functions provided by the [URL="http://www.w3schools.com/jsref/jsref_obj_date.asp"]Date object[/URL] of Javascript and try your own hand at it. Post your attempt with the problems you are facing if you are stuck. | |
Re: Javascript executes on the client machine. The thing you are trying to do involves server side interaction. Either fetch the entire Google Homepage as plain text using Ajax's 'responseText' or do it pure server side and generate the entire HTML on fly. There are a lot of 'Eeek' things in … | |
Re: > i would like to avoid rediracting to the file css What do you mean by 'redirecting' to the CSS file? The markup you wrote 'links' to an external CSS file. If you don't want to, just remove the line or comment it. Plus the way you provide your 'href' … | |
Re: You need to access the element value by using the '[INLINECODE]value[/INLINECODE]' property of the form element. The [INLINECODE]document.getElementById()[/INLINECODE] function returns an [INLINECODE]Element[/INLINECODE], not it's value. Do something like: [code] var value = document.getElementById('txt' + i).value; if(value == '') { //do something }[/code] Just keep in mind that this kind of … | |
Re: When written above the form, the script tries to access an element which isn't there i.e. since the form hasn't been yet created, there is no form element whose fieldname you can access. When written below, it obviously works as expected. | |
Re: Look into the [INLINECODE]createElement [/INLINECODE]and [INLINECODE]appendChild[/INLINECODE] functions of DOM to achieve your task. | |
Re: [quote=Teachingmyself;284764]Is that a good thing or a bad thing? :)[/quote] [quote=cscgal;284815]I think it's an awesome thing :)[/quote] Yeah Miss Dani has already asked her Web site graphics designer to make a new badge for you which reads "SPAMMER". (joking) :D ![]() | |
Re: > what the hell is wrong? You should be the one telling us that. I would be surprised if something like this post even got answered. Just telling that things _don't_ work isn't helpful for anyone. That all being said, you should at least find out if this problem is … |
The End.