I recently made my first ever ajax chat, and works given im a noob im quite happy about it :P How ever, sadly - its not smooth like some ajax chat's i've seen out there. And when i submit a message to teh chat the page refreshes.I was wondering if some one could help me by explaining how i can improve the efficientcy of it so it won't refresh and reacts alot quicker to create a live effect - This is what i got for my code:
The PHP is chat.php loads the chat (a MYSQL query getting latest 20 chat messages and loops them out into the div)chatpost inserts the message to the table.
I'm having a great deal of trouble figuring out how to make this div continuously scroll smoothly while hovered over the arrows. It's almost like there is easing on the animation but I don't have any easing set for this instance of the animation. I'm really at a loss as to how to make this smoother.
I'm working on a website for a client and we've decided to use CSS3 instead of Flash for multiple reasons, compatibility with mobile devices being the main. However, there's a lot of animation on the page such as fading, positioning and opening/closing and it seems to be tripping over itself attempting to process everything.
I've created an animation class that schedules all of the animations so that there's only one setTimeout running for those animations at any given time. I've also set it up so that any web browser capable of CSS3 transitions use those instead of the JS animations. The animations lag in both CSS3 and JS functionality, although the CSS3 is slightly better.Some animations lag even if they're the only animation running. For instance, trying to fade a full-screen image in/out chugs even on test pages I've created only containing the one function.
I understand that Flash uses hardware acceleration and has optimized rendering, and the reason the browser is lagging is most likely because it's all being processed unoptimized and through the CPU. However, I'm sure there must be a way to make this site smoother than it is.I'm posting here because my deadline is coming hard and fast, to ask for assistance with:Tips on how to optimize my code to run smoother in JS and/or CSS3.how to be able to fade large images/areas with less lag.I've been trying to move most of my code into OOP as I've gone along, but some functions are still a bit "spaghetti" due to my time crunch.
i am working on a page which direct users who come on website to index.php which i created in a new pop up window. i was checking that if someone (stupidly) refresh the url of my web from where he is redirected to the index.php ,it re run the funtion and another pop up is created. is there anyway i can add validation kind of thing that if pop up is created it alert the user that web page already opened. can i able to do that?
There are a lot of extremely smart members here, so I thought if the knowledge is out there, this would be the place to tap into it. I have included the code below that I am working with. What I want is for a person to enter their name and room number and coffee preference. Then a cookie will store that information and tell them a cup will be sent to them at their room. When the page is loaded again their preference will be remembered and they will be offered a discount for their favorite coffee. This is part of a self taught book I am studying.
Most of it works, but I think the selection of coffee from the radio button is not being stored in the cookie, or at least I can not recall it. I was also wondering if there was some way that I could combine the makeCookie and welcome functions so that there would only be one button to click on the page. Code:
I'm having difficulty making a list (both drop down and radio button) read only; I am successful when I attempt to make a text field read only. Any suggestions on what java script I use to accomplish this?
<ul> <li>item 1 <li>item2 </ul>
However, I need to make this XHTML compliant, so I needed to add the </li> tag into the mix. Unfortunately, the only way to find where to put it is to find the next[*] (<li>) tag or an open list (in the case of nested lists) or close list tag. I was trying to get a rule that handles the list items to work, but it only matches the first item in any list. Here is the line of code:
First, I check to make sure that the list item is inside a list. Then, I match the[*] tag to find the start of the item, then I match either the next[*],, orto determine the end of the item. This successfully prevents a list item outside of a list from being made into a <li> element, but only matches the first list item in a list. Is there any way to make this match all occurances of this pattern without looping over the statement until the pattern can no longer be found?
I don't know if this will work, but I'm trying to put a google map on my website and in IE, the div containing the map needs to have a width value in pixels in order for the API to center the map properly. want a div with 100% width, which is inside another expanding column. This works everywhere but IE. My question is, Is there a way, using jQuery, to get the div to discover its inherent width and then apply that in pixels, as an inline style, to that tag? It would also have to redefine its width when the window resizes.
I am trying to build a calendar that has clickable dates that reveal a pop up box with the event of the day when you click on them.I have got some basic functionality at the moment with the pop up working on one date,making it work on multiple dates.at the moment I have the pop up box positioned relative and and am using the toggle function to switch the display form none to block.I need to work out how to position the pop up box no matter which date you click on?here is the mark up for part of the table:
I am trying to get a dialog box to open another dialog box. Clicking on "more search options" the first time results in opening a dialog box. Clicking "search" within the dialog box results in opening up a second dialog box. But this only works the first time I click on "more search options". In other words, the second dialog box only opens up only once. To get the second dialog to open again, I have to reload the page in the browser. CSS and jquery code can be downloaded from [URL].
Here is the code I am working with:
As you can probably see I am trying to set the start point of a jquery carousel to equal a variable that I have created. You can see I have tried " start: secondstartpoint", but this isn't working. I think possibly because the way the plugin is formatted so that the "start" option can only equal a number.
I'm about to give up with this one. I know this is possible in IE. In fact, I think this is the only thing IE does properly.Here is the working code for IE that should work in other browsers (Firefox,Chrome...) but doesn't.