- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 15
- Posts with Upvotes
- 15
- Upvoting Members
- 14
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
166 Posted Topics
Re: You need to wrap your drawing functionality in a function that gets called on load. The js is running before the canvas object is on the screen.Here is the tutorial code on the mozilla mdc site: [CODE]<html> <head> <script type="application/javascript"> function draw() { var canvas = document.getElementById("canvas"); var ctx = … | |
Re: Also you don't want to give an input within the form a name="submit", when calling the form's submit function as above, as it will get confused for the forms submit method. As a side note (in case it's not obvious) you can do the above example with any type of … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/ms533050(v=vs.85).aspx"]http://msdn.microsoft.com/en-us/library/ms533050(v=vs.85).aspx[/URL] Contains a list of HTML Elements which could be considered "safe". | |
Re: Change the position absolute to position relative. [CODE] #foot { background:none repeat scroll 0 0 #CCCCFF; bottom:0; height:200px; position:relative; width:500px; } [/CODE] | |
Re: Some code would help. It's possible if you have any floated elements before or after it might cause it to draw weird. Also if it is contained in a table without position:fixed set it might cause a repaint which might fix your layout. | |
Re: Douglas Crockford has a really straightforward discussion on classical inheritance with Javascript here [URL="http://www.crockford.com/javascript/inheritance.html"]http://www.crockford.com/javascript/inheritance.html[/URL]. He also presents a decent lecture on yui theater. Basically while everything can be viewed as objects, OOP in javascript isn't the same at all as in other languages since it is classfree and loosely-typed. Classes … | |
Re: From the code provided I saw a few things that weren't working for me. In the config function where you are assigning the onclick events it looks like you are attempting to use jQuery to grab the elements. I don't know if you are grabbing by class name or by … | |
Re: Looks like you need to clear your floats. Basically IE has this proprietary setting that determines how elements draw called hasLayout. To trigger this with floated divs an easy fix is sometimes to add the css zoom:1 to the div. [CODE]#divone, #divtwo, #divthree, #divfour, #divfive { width:inherit; margin: 0; display: … | |
Re: A lot of the guys at my shop use Notepad++ but I started my programming in VI so I use gvim for windows. It's customizable(color schemes, code highlight, spell check) and does what I need it to do. There is also Ultra Edit and eclipse. | |
Re: The concept/technology you are looking for is ajax. Check out this tutorial site:[url]http://www.ajaxtutorial.net/index.php/category/ajax-basics/[/url]. Then post any specific questions you have. | |
Re: What are the file permissions on test.jsp? If you are in linux you will want to run [CODE]chmod a+x test.jsp[/CODE]. | |
Re: You can solve this if you break it into pieces. If you don't at least try it first all you are going to get is a down vote. First break the problem down, what do you need to do? First you need to read in data, so read up on … | |
Re: Here is a very basic one: [CODE]<ul> <li> <a href='javascript:void(0)' id='firstLink'> Link 1 <ul> <li>Link2</li> <li>Link 3</li> </ul> </a> </li> </ul> [/CODE] [CODE] <style> li a ul{ display:none; } li a{ display:inline-block; } li a:hover ul { display:block; } </style>[/CODE] If you want to see it in action here is … | |
Re: You can simplify the onclick by passing this (which references the triggering element). Then use the getAttribute("value") on that element. [CODE]<img src="Lighthouse.jpg" class="card" id="card1" value="50" onclick="reveal(this)" />[/CODE] [CODE] function reveal(card) { var value = card.getAttribute("value"); alert(value); }[/CODE] Images don't really have a value so you need to use Get Attribute … | |
Re: Your delete syntax looks off, move your where clause and in the getDeleteCustomer remove the "*". Here is a link to [URL="http://www.techonthenet.com/sql/delete.php"]proper delete from syntax[/URL]. [CODE] delete from customer where CustomerName='$cname' and CustomerAddress='$cusadd1' and CustomerAddress1='$cusadd2' and CustomerAddress2='$cusadd3' and County='$ccounty' and CustomerPostCode='$custpc' and CustomerTelNo='$custele' and CustomerEmail='$cusemail' and customerid=$cid [/CODE] [CODE]function getDeleteCustomer($id){ … | |
Re: It's just a drop down menu. Here is a very basic one: [CODE]<ul> <li> <a href='javascript:void(0)' id='firstLink'> Link 1 <ul> <li>Link2</li> <li>Link 3</li> </ul> </a> </li> </ul> [/CODE] [CODE] <style> li a ul{ display:none; } li a{ display:inline-block; } li a:hover ul { display:block; } </style>[/CODE] If you want to … | |
Re: Tables aren't used in css. Css is just for layout attributes. Tables are html elements (ie. the layout). Information on tables can be see [URL="http://www.quackit.com/html/html_table_tutorial.cfm"]here[/URL]. | |
Re: Start here: [URL="http://docs.jquery.com/How_jQuery_Works"]How JQuery Works[/URL]. Read the API/Documentation on the [URL="http://docs.jquery.com/"]Jquery Site[/URL], it is why it exists. Then after you have read about jQuery, come back, and ask specific questions about jQuery that you don't understand. All of your questions above can be answered if you RTFM. | |
Re: Try cleaning up some of the JS errors and I bet you it will work a bit better. In setup.js in [CODE]$('#pethiopia').zoommap({})[/CODE] At around line 34 you have an extra "," at the end of your object. IE 7 doesn't like there where firefox could care less.[CODE]$('#pethiopia').zoommap({ // Width and … | |
Re: jQuery is javascript. What are you trying to get out of using Autocomplete? I see no correlation between the site id and the site names. Beyond that by initializing the autocomplete in an array like that you are resting the acutocomplete function for every value in the siteIDs array. Your … | |
Re: Ajax is a series of techniques to send data to the server from the client side. PHP is a server side language. There isn't a comparison. Using google.com will give you all the information you need on the two subjects. When you have more detailed questions perhaps you will get … | |
Re: In your focus event put a console.log that specifies what this and title are (assuming you have Firefox and firebug available as IE's debugger doesn't show objects in the console.log). Have you tried this with a click even rather than focus? | |
Re: Basically there is a conflict because both jQuery and prototype use "$" as their control character. To make jQuery work with other frameworks you should use [CODE]jQuery.noConflict();[/CODE] To force jQuery to release the "$" and so you can either assign a new variable or just use jQuery (which is simpler). … | |
![]() | Re: I usually do a browser detect and add a class to the body of the html document that specifies which browser. Then I base the css off that class. I mostly do the browser detect on the Server side using the user agent string and searching for the relevant browser … |
Re: Do a regular expression search for "\n" and replace with <br>. For example in perl I would do [CODE]$input =~ /\\n/<br>/g;[/CODE] Don't know how you are brining in your text or what language you are working in but it can be done in any language, server side or client side. | |
Re: What have you tried so far that didn't work? Are you placing everything in an event handler for jquery's ready event or using the standard window.onload()? Basically what I would do would grab all the anchors, look at the href attribute, and then use the javascript test function to perform … | |
Re: Your image map area shape "poly" is misspelt everywhere you use it. Try "poly" or "polygon" rather than "ploy". Also your coordiantes don't use (). [CODE]<area shape="[COLOR="Red"]ploy[/COLOR]" coords="(457,84),(474,63),(549,63),(566,84)," href="pages/child.htm" alt="Child Photos"/>[/CODE] should be [CODE]<area shape="[COLOR="Red"]polygon[/COLOR]" coords="457,84,474,63,549,63,566,84," href="pages/child.htm" alt="Child Photos"/>[/CODE]. Read this tutorial on [URL="http://www.javascriptkit.com/howto/imagemap.shtml"]Image Maps[/URL] | |
Re: Ajax is a set of techniques to perform asynchronous requests to a server from the client side. Meaning you click check all and it sends data back to the server and waits for a response without hanging your web page and without a page post. Once you bring another page … | |
Re: I'm kinda answering blind here as I don't know what your html structure is like nor how you are handling the mouse events with jquery but. I would use a combination of CSS classes with the mouse events. When the mouse is in a sub menu just apply some class … | |
Re: From the site the code looks like it's [URL="http://www.php-learn-it.com/tutorials/starting_with_php_and_ajax.html"]from[/URL]: "Making AJAX Request The function below sends the request out to our text.php script using the [COLOR="Red"]method post with the value filled in the input text box 'name' using $F(‘name') which retrieves the values we put in the text box[/COLOR]. The … | |
Re: Could you provide code sample (ie HTML and Javascript) for the checkbox in question? | |
Re: The most intuitively apparent place set theory is exposed though is in Databases (pretty much all of Database theory is set theory).Digital logic is another more specific subject where you will notice set theory the most. But if you examine things a bit more closely you can see set theory … | |
Re: Your problem is coming from the fact that the server doesn't know what the client side is doing. You need to save the state of the list box (using SQL or a file) and update that state, through an ajax call or form submit, anytime the client side makes a … | |
Re: You could place a class on either a wrapper that goes around the header or on the body and then just specify the background or background-position (if using a sprite use position) for each of the sites. The #header code would be your base case and then you would specify … | |
Re: I'm guessing you are trying a tutorial for Prototype's Window class (a little more information/context in the future would be awesome btw). If it's asking for you to setDestroyClose in the constructor I think what is wants is this: [CODE]win = new Window({className: "mac_os_x", title: "Sample", width:200, height:150, [COLOR="Red"]destroyOnClose: true[/COLOR], … | |
Re: Don't use the form submit. When you submit a form it causes a page refresh. If there is data in the form that you need to pass back to the server then do so in the click event for the button using ajax and then close the dialog. In your … | |
Re: Just my thoughts but, if you can build your site just fine without frames why add the hassle of frames? With the discovery and wide use of Ajax and other frameworks you can accomplish everything that you would use a frame for with less effort. | |
Re: If you are trying to specifically hit all images that are inside anchors that are inside an element with an id of gallery then you will want to define it this way: [CODE]#gallery a img { border: none; /* could still be border-style:none; but this just takes care of it … | |
Re: In normal web communications the browser(client) determines what is going on through requests to the server. The server doesn't know anything but what the client requests and generally doesn't have a mechanism for telling the client anything that the client doesn't make a request for (has to do with the … | |
Re: You will need to maintain the selection on the server side either by setting the selected radio button when you render it or via serverside generated javascript that sets the checked attribute, as you ha[CODE][/CODE]ve above. The reason why the code you have doesn't work is because the currently rendered … | |
Re: There are a couple of techniques. The one I would suggest looking at is what is generally known as sliding door. A demo/tutorial for it is here: [URL="http://www.alistapart.com/articles/slidingdoors/"]css sliding door[/URL].Most use this technique for buttons or tabs but it can be expanded to work with four corners. You will need … | |
Re: One of the things that jump out at me in particular is this line: [CODE]rentdue = rentdue + 10;[/CODE] You define rentdue as a DOM element then you assign it itself plus 10. This won't ever work. If you want to put the value inside the input box (guessing that's … | |
Re: You might look at [URL="http://hookbox.org/"]hookbox[/URL] or [URL="http://www.lightstreamer.com/index.htm"]light streamer[/URL]. I've not worked with either but they both look like viable solutions depending on your needs. Hookbox looks nice because it doesn't require a local install, you can create a login on the hookbox hosted servers and use that. Here is a … | |
Re: To get the innerhtml of the clicked item you only need: [CODE]$(".myid").click(function(){ this.innerhtml(); });[/CODE] The keyword "this" refers to the element that triggered the event. | |
Re: As far as I know (even though it makes sense to do it the way you have it), IE doesn't support background styles (will handle height,width ok) on the html element. It should be ok to do on the body though. If you need two different sections of backgrounds you … | |
Re: Looks centered for me, I tested in IE8 under IE8 standards mode and IE7 standards mode). The height issue shows up in IE7 standards mode but not IE8 standards mode. But I think that will be fixed it you set the div with class innerDialog to have 100% height: [CODE].innerDialog{height:100%;}[/CODE] | |
Re: I wouldn't use an actual html drop down but a styled div that sits below the input box(you can even add an anchor with an image next the input box to make it appear like an actual drop down. You basically have an onchange event listener on the input box … | |
Re: What parts of coding it are you having issues with? More info about what is giving you issues would be helpful. If you are having issues with just figuring out where to start then this is what I normally do. I look at the page and determine which area/zones can … | |
Re: The server doesn't know anything but what the client (browser) tells it and only for the duration of the current request. What that means is once the browser makes a request for the page, the server code runs and spits out the requested page and then forgets about the client. … | |
Re: Just in glancing it looks like you have a new line in this one and you can't have newlines within a string like this or it will think it's an unterminated string. [CODE] r_text[52] = "<a href='http://www.youtube.com/watch_popup?v=H86W8MxD1Ps' target='_blank'> Click here for the inspirational sports story of <b>Derek Redmond</b></font></a>."; [/CODE] should … |
The End.