From tedd at sperling.com Wed Aug 13 11:50:52 2008 From: tedd at sperling.com (tedd) Date: Wed, 13 Aug 2008 12:50:52 -0400 Subject: [Javascript] Pre-load images Message-ID: Hi gang: I have a script that pre-loads images (who doesn't?). Without the pre-load, I get major flashes on image roll-overs. With pre-load, it cuts the flashes down to almost nothing. But I still notice flashes occasionally on image roll-overs -- is that to be expected? Is that a browser thing or should it not happen at all? Thanks, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From mdougherty at pbp.com Wed Aug 13 12:39:47 2008 From: mdougherty at pbp.com (Mike Dougherty) Date: Wed, 13 Aug 2008 12:39:47 -0500 Subject: [Javascript] Pre-load images In-Reply-To: References: Message-ID: <59bedf280808131039y4a9f2a70q94185c11deacdb86@mail.gmail.com> On Wed, Aug 13, 2008 at 11:50 AM, tedd wrote: > > I have a script that pre-loads images (who doesn't?). > > Without the pre-load, I get major flashes on image roll-overs. > > With pre-load, it cuts the flashes down to almost nothing. But I > still notice flashes occasionally on image roll-overs -- is that to > be expected? Is that a browser thing or should it not happen at all? I don't know what your images are like, but have you considered image sprites as a solution to "rollover flash" ? A discussion here: http://www.alistapart.com/articles/sprites this is good too: http://www.peachpit.com/articles/article.aspx?p=447210 Another example here (in the context of 14 rules): http://stevesouders.com/hpws/sprites.php From schneegans at internetique.com Wed Aug 13 12:34:25 2008 From: schneegans at internetique.com (Claude Schneegans) Date: Wed, 13 Aug 2008 13:34:25 -0400 Subject: [Javascript] Pre-load images In-Reply-To: References: Message-ID: <48A31B21.7000009@internetique.com> >>Is that a browser thing or should it not happen at all? Which browser are you using? Any address to show your page? -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: piegeacon at internetique.com) Thanks. From Mark.Rees at astrazeneca.com Thu Aug 14 03:38:23 2008 From: Mark.Rees at astrazeneca.com (Rees, Mark) Date: Thu, 14 Aug 2008 09:38:23 +0100 Subject: [Javascript] Pre-load images In-Reply-To: <59bedf280808131039y4a9f2a70q94185c11deacdb86@mail.gmail.com> Message-ID: On Wed, Aug 13, 2008 at 11:50 AM, tedd wrote: > > I have a script that pre-loads images (who doesn't?). > > Without the pre-load, I get major flashes on image roll-overs. > > With pre-load, it cuts the flashes down to almost nothing. But I > still notice flashes occasionally on image roll-overs -- is that to > be expected? Is that a browser thing or should it not happen at all? >I don't know what your images are like, but have you considered image >sprites as a solution to "rollover flash" ? >A discussion here: http://www.alistapart.com/articles/sprites >this is good too: http://www.peachpit.com/articles/article.aspx?p=447210 >Another example here (in the context of 14 rules): >http://stevesouders.com/hpws/sprites.php _______________________________________________ If you are using CSS for image rollovers, this might be of interest as well: http://www.fivesevensix.com/studies/ie6flicker/ From javascript at webdesignofficina.com Thu Aug 14 06:14:14 2008 From: javascript at webdesignofficina.com (Guillaume) Date: Thu, 14 Aug 2008 13:14:14 +0200 Subject: [Javascript] Pre-load images In-Reply-To: References: Message-ID: <48A41386.8020305@webdesignofficina.com> > Hi gang: > > I have a script that pre-loads images (who doesn't?). > > Without the pre-load, I get major flashes on image roll-overs. > > With pre-load, it cuts the flashes down to almost nothing. But I > still notice flashes occasionally on image roll-overs -- is that to > be expected? Is that a browser thing or should it not happen at all? > This can happen if you clear the browser cache while your page containing the rollover is still open... When you go to the open page, call the rollover again, the image is not there anymore so the browser calls the image again and that's probably why you get the flash... The simplest explanation I have from my experience... Hope this helps. Guillaume > Thanks, > > tedd > > > From davidh126 at writeme.com Thu Aug 14 20:04:59 2008 From: davidh126 at writeme.com (David Hucklesby) Date: Thu, 14 Aug 2008 18:04:59 -0700 Subject: [Javascript] Pre-load images In-Reply-To: Message-ID: <200881418459.983479@david-7cda2c387> On Wed, 13 Aug 2008 12:50:52 -0400, tedd wrote: > Hi gang: > > I have a script that pre-loads images (who doesn't?). > I don't. If I need to pre-load images, I put them in a DIV that's off-lefted (use your favorite off-left technique for this.) For good measure, I include image attributes '' -- but this may not be necessary. > Without the pre-load, I get major flashes on image roll-overs. > > With pre-load, it cuts the flashes down to almost nothing. But I still notice flashes > occasionally on image roll-overs -- is that to be expected? Is that a browser thing or > should it not happen at all? > There is some JS mumbo-jumbo that can take care of this[1], but I suggest putting a far future "expires" header on your images if you can. This not only prevents the browser from trying to download images a second or third time, but improves the speed of your pages on subsequent visits: [1] Cordially, David -- From mmwaldman at optonline.net Tue Aug 19 13:51:51 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Tue, 19 Aug 2008 14:51:51 -0400 Subject: [Javascript] DOM not yet loaded Message-ID: <0K5V0046D35TQUD0@mta5.srv.hcvlny.cv.net> I was wondering how folks handle the case where the document has not yet loaded and you want to manipulate dynamic elements and do things like resize the frame in an onload trigger function. What I wound up doing was seeing if critical elements existed yet and things like checking the height of an image to make sure it's loaded. I wasn't sure how else to see if the document was ready in the onload trigger. Better ways? I found a jquery dom.ready function, but I didn't want to download jquery just for that. Margaret Michele Sovereign Sites L.L.C. Website Development Rule your domain ... From mmwaldman at optonline.net Tue Aug 19 14:14:13 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Tue, 19 Aug 2008 15:14:13 -0400 Subject: [Javascript] Ajax - New Page Message-ID: <0K5V007UA473AY80@mta5.srv.hcvlny.cv.net> How do folks handle xml returning to an ajax page when the page has changed? I have an ajax page. When I click a link to a new page, I get an ajax xml error from the previous page. Margaret Michele Sovereign Sites L.L.C. Website Development Rule your domain ... From rer at datacompusa.com Tue Aug 19 15:08:19 2008 From: rer at datacompusa.com (Roger Roelofs) Date: Tue, 19 Aug 2008 16:08:19 -0400 Subject: [Javascript] Ajax - New Page In-Reply-To: <0K5V007UA473AY80@mta5.srv.hcvlny.cv.net> References: <0K5V007UA473AY80@mta5.srv.hcvlny.cv.net> Message-ID: <858ACC52-0C91-4107-937B-0E057A7895DF@datacompusa.com> Margaret, On Aug 19, 2008, at 3:14 PM, (Margaret) Michele Waldman wrote: > How do folks handle xml returning to an ajax page when the page has > changed? > > I have an ajax page. When I click a link to a new page, I get an > ajax xml > error from the previous page. We are going to need to see the pages to have any hope of helping. Roger -- Roger Roelofs Datacomp Appraisal Services 3215 Eaglecrest, NE Grand Rapids, MI 49525 From mmwaldman at optonline.net Tue Aug 19 17:50:23 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Tue, 19 Aug 2008 18:50:23 -0400 Subject: [Javascript] Ajax - New Page In-Reply-To: <858ACC52-0C91-4107-937B-0E057A7895DF@datacompusa.com> Message-ID: <0K5V009L1E7DDS81@mta1.srv.hcvlny.cv.net> It would be a general thing. Ajax in the classic form creates an xml object and calls a php script. When the server finishes with the php script, it returns xml. However, if the page that originally called the php script is no longer in the client's browser and error is generated by the xml. You can look at the website: http://www.wantedgaming.com/shop. Click the right box alternating breaking/game news over repeatedly. They are both ajax pages. Eventually, the xml error will occur because the client is switching out the pages faster than the server is returning the xml object. Maybe, I should switch to the script element version of Ajax instead. This would not be a normal use of the website. -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of Roger Roelofs Sent: Tuesday, August 19, 2008 4:08 PM To: JavaScript List Subject: Re: [Javascript] Ajax - New Page McAfee SiteAdvisor Warning This e-mail message contains potentially unsafe links to these sites: evolt.org Margaret, On Aug 19, 2008, at 3:14 PM, (Margaret) Michele Waldman wrote: > How do folks handle xml returning to an ajax page when the page has > changed? > > I have an ajax page. When I click a link to a new page, I get an > ajax xml > error from the previous page. We are going to need to see the pages to have any hope of helping. Roger -- Roger Roelofs Datacomp Appraisal Services 3215 Eaglecrest, NE Grand Rapids, MI 49525 _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From david at dorward.me.uk Tue Aug 19 18:10:03 2008 From: david at dorward.me.uk (David Dorward) Date: Wed, 20 Aug 2008 00:10:03 +0100 Subject: [Javascript] Ajax - New Page In-Reply-To: <0K5V009L1E7DDS81@mta1.srv.hcvlny.cv.net> References: <0K5V009L1E7DDS81@mta1.srv.hcvlny.cv.net> Message-ID: <3B78CD3B-EBB9-4192-88AD-E19223586FD0@dorward.me.uk> On 19 Aug 2008, at 23:50, (Margaret) Michele Waldman wrote: > It would be a general thing. > > Ajax in the classic form creates an xml object and calls a php script. > > When the server finishes with the php script, it returns xml. Not quite. In the classic form, it creates an XMLHttpRequest object and makes a request to the server, which returns XML. XML doesn't need to be passed, and PHP doesn't need to be used to generate the response. These days (i.e. the non-classic form), its generally accepted that Ajax means any use of JavaScript to make an HTTP request and update the page based on the response. > However, if the page that originally called the php script is no > longer in > the client's browser and error is generated by the xml. The XMLHttpRequest object should have been destroyed when the browser discarded the page. The response from the server should be ignored. > You can look at the website: http://www.wantedgaming.com/shop. > > Click the right box alternating breaking/game news over repeatedly. > They > are both ajax pages. Eventually, the xml error will occur because the > client is switching out the pages faster than the server is > returning the > xml object. I can't reproduce the problem. The only complaints my debugger gives are warnings that you are using document.all. http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages:Using_the_W3C_DOM -- David Dorward http://dorward.me.uk/ http://blog.dorward.me.uk/ From mmwaldman at optonline.net Tue Aug 19 19:01:07 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Tue, 19 Aug 2008 20:01:07 -0400 Subject: [Javascript] Ajax - New Page In-Reply-To: <3B78CD3B-EBB9-4192-88AD-E19223586FD0@dorward.me.uk> Message-ID: <0K5V009JAHH9CRG0@mta5.srv.hcvlny.cv.net> -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of David Dorward Sent: Tuesday, August 19, 2008 7:10 PM To: JavaScript List Subject: Re: [Javascript] Ajax - New Page McAfee SiteAdvisor Warning This e-mail message contains potentially unsafe links to these sites: evolt.org On 19 Aug 2008, at 23:50, (Margaret) Michele Waldman wrote: > It would be a general thing. > > Ajax in the classic form creates an xml object and calls a php script. > > When the server finishes with the php script, it returns xml. Not quite. In the classic form, it creates an XMLHttpRequest object and makes a request to the server, which returns XML. XML doesn't need to be passed, and PHP doesn't need to be used to generate the response. ..........>> Right, I was being lazy in the summary. These days (i.e. the non-classic form), its generally accepted that Ajax means any use of JavaScript to make an HTTP request and update the page based on the response. > However, if the page that originally called the php script is no > longer in > the client's browser and error is generated by the xml. The XMLHttpRequest object should have been destroyed when the browser discarded the page. The response from the server should be ignored. ........>> The xml response seemed to be returned. > You can look at the website: http://www.wantedgaming.com/shop. > > Click the right box alternating breaking/game news over repeatedly. > They > are both ajax pages. Eventually, the xml error will occur because the > client is switching out the pages faster than the server is > returning the > xml object. I can't reproduce the problem. The only complaints my debugger gives are warnings that you are using document.all. ........>> I haven't been able to reproduce it lately either. http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages:U sing_the_W3C_DOM -- David Dorward http://dorward.me.uk/ http://blog.dorward.me.uk/ _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From ovsnk-reachme at yahoo.com Wed Aug 20 00:01:48 2008 From: ovsnk-reachme at yahoo.com (Nagendra Oleti) Date: Tue, 19 Aug 2008 22:01:48 -0700 (PDT) Subject: [Javascript] Unknown runtime error Message-ID: <821998.82108.qm@web31103.mail.mud.yahoo.com> Hi The following sample throws "Unknown runtime error", any ideas?to fix this?
thanks Nagendra Oleti From khurana.abhi at gmail.com Wed Aug 20 00:50:19 2008 From: khurana.abhi at gmail.com (abhishek khurana) Date: Wed, 20 Aug 2008 11:20:19 +0530 Subject: [Javascript] Unknown runtime error In-Reply-To: <821998.82108.qm@web31103.mail.mud.yahoo.com> References: <821998.82108.qm@web31103.mail.mud.yahoo.com> Message-ID: <5b3689e70808192250q42bc806aq8cd937f27289fe1a@mail.gmail.com> Hey Nagendra, A little heads up it wud have been mentioning the browser causing this problem. The snippet (provided by u) works well on FF. A little bit of googling, makes me arrive to the following snippet to make it work on IE: > > > > >
> > > thanks, On Wed, Aug 20, 2008 at 10:31 AM, Nagendra Oleti wrote: > Hi > The following sample throws "Unknown runtime error", any ideas to fix this? > > > > > >
> > > thanks > Nagendra Oleti > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > -- Abhishek Khurana www.iXiGO.com your travel search begins here +91 9899270737 iXiGO.com A NASSCOM Top-100 Innovator and a Red Herring Top-100 Global Finalist From trojani2000 at hotmail.com Thu Aug 21 00:59:33 2008 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 21 Aug 2008 05:59:33 +0000 Subject: [Javascript] Unknown runtime error In-Reply-To: <821998.82108.qm@web31103.mail.mud.yahoo.com> References: <821998.82108.qm@web31103.mail.mud.yahoo.com> Message-ID: Hi Nagendra, This is an example of bad nesting of html tags. Are you presuming that your code is correct? is a proprietary html tag. Never a part of any standard. Have you tested if can have children? On what base do you expect that you can put a block level container element inside a nobreak tag instrucion, when next first encountered element is a generically line-breaking element. Using
... is frankly illegall, but
...content......content...
might be. Try nesting your elements the correct way. Cause there's no logic, nor a practicall reason in placing a
inside a tag. For what purpose? The
...
will work hust fine, but will not validate. consider using css white-space:no-wrap instead. Regards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Date: Tue, 19 Aug 2008 22:01:48 -0700> From: ovsnk-reachme at yahoo.com> To: javascript at lists.evolt.org> Subject: [Javascript] Unknown runtime error> > Hi > The following sample throws "Unknown runtime error", any ideas to fix this?> > > > > >
> > > thanks> Nagendra Oleti> _______________________________________________> Javascript mailing list> Javascript at lists.evolt.org> http://lists.evolt.org/mailman/listinfo/javascript _________________________________________________________________ Get thousands of games on your PC, your mobile phone, and the web with Windows?. http://clk.atdmt.com/MRT/go/108588800/direct/01/ From rajarsn at gmail.com Fri Aug 29 21:39:08 2008 From: rajarsn at gmail.com (Rajaram Sahasranaman) Date: Sat, 30 Aug 2008 08:09:08 +0530 Subject: [Javascript] Need Javascript logic for going to homepage if the previous history not available Message-ID: <8c6efe180808291939h3be3fce4s7095c4556e4c24ce@mail.gmail.com> Hi, In my aspx page, I have two tabs. I have written a javascript in such a way that if the user clicks on first tab, it will go to the previous page visited and that will be the required behaviour which is working perfectly fine. Sometimes the previous history will not be available. In the sense, there is an option that the user can directly visit the page by making changes in the url without going to login and home page. In such a case, I need to show the user the home page. How will I do that? Can anybody provides any logic to me for this? I have used the following JS code for going to previous page. function UltraWebTabMain_Click(oWebTab,oTab,oEvent) { var wTab = igtab_getTabById("ctl00_TabControl1_UltraWebTab1"); if(wTab!=null) { var tab = wTab.getSelectedTab(); if(tab!=null) { var tabtext = tab.getText(); var FirstTab = 0; if ((oTab.Key == "Search") && (tabtext != "Search")) { window.history.go(-1); wTab.setSelectedIndex(FirstTab); } } } } Can I do any modification to the above JS code so that the user should be directed to Home Page if history not present? Can anybody provide any help please? Thanks Meeram395[image: Smile] From mmwaldman at optonline.net Sat Aug 30 06:03:14 2008 From: mmwaldman at optonline.net ((Margaret) Michele Waldman) Date: Sat, 30 Aug 2008 07:03:14 -0400 Subject: [Javascript] Need Javascript logic for going to homepage if theprevious history not available In-Reply-To: <8c6efe180808291939h3be3fce4s7095c4556e4c24ce@mail.gmail.com> Message-ID: <0K6E003O1UP9COI0@mta5.srv.hcvlny.cv.net> I'm not sure what your looking for here. To go to the home page use Window.location = url Michele -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of Rajaram Sahasranaman Sent: Friday, August 29, 2008 10:39 PM To: javascript at lists.evolt.org Subject: [Javascript] Need Javascript logic for going to homepage if theprevious history not available undefined undefined evolt.org Hi, In my aspx page, I have two tabs. I have written a javascript in such a way that if the user clicks on first tab, it will go to the previous page visited and that will be the required behaviour which is working perfectly fine. Sometimes the previous history will not be available. In the sense, there is an option that the user can directly visit the page by making changes in the url without going to login and home page. In such a case, I need to show the user the home page. How will I do that? Can anybody provides any logic to me for this? I have used the following JS code for going to previous page. function UltraWebTabMain_Click(oWebTab,oTab,oEvent) { var wTab = igtab_getTabById("ctl00_TabControl1_UltraWebTab1"); if(wTab!=null) { var tab = wTab.getSelectedTab(); if(tab!=null) { var tabtext = tab.getText(); var FirstTab = 0; if ((oTab.Key == "Search") && (tabtext != "Search")) { window.history.go(-1); wTab.setSelectedIndex(FirstTab); } } } } Can I do any modification to the above JS code so that the user should be directed to Home Page if history not present? Can anybody provide any help please? Thanks Meeram395[image: Smile] _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript