[WSG] DOM setAttribute in IE?
Here's a function: function helpLinks() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == help) { anchor.setAttribute( onclick,window.open(this.href,'popupwindow','width=400,height=400,scr ollbars,resizable'); return false;,0); } } } It works perfectly well in everything I can get my hands on except for IE, where it fails to set the onclick event to all A elements with a rel attribute of 'help'. Changing anchor.setAttribute(...) to anchor.setAttribute('target','_blank',0); DOES work (the link opens in a new window), so it would appear that IE doesn't like setting onlick attributes this way. Can anyone either: - suggest an alternate way to achieve this, or - suggest a good mailing list to seek further help on (like a DOM list) --- Justin French http://indent.com.au ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] DOM setAttribute in IE?
On Thu, 2004-08-19 at 16:22, Justin French wrote: Can anyone either: - suggest an alternate way to achieve this, or This might help http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/attachevent.asp if (anchor.attachEvent) anchor.attachEvent(onClick, function_name); ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] DOM setAttribute in IE?
You can use attachEvent method for this. But it's supported by Internet Explorer 6 only. -- a href=about:mozilla rel=helptest/a script type=text/javascript var anchors = document.getElementsByTagName('a'); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute('rel') == 'help') { anchor.attachEvent( 'onclick', function() { window.open(event.srcElement.getAttribute('href'),'popupwindow','width=400,h eight=400,scrollbars=1,resizable=1'); return false; } ); } } /script -Original Message- Here's a function: function helpLinks() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == help) { anchor.setAttribute( onclick,window.open(this.href,'popupwindow','width=400,height=400,scr ollbars,resizable'); return false;,0); } } } It works perfectly well in everything I can get my hands on except for IE, where it fails to set the onclick event to all A elements with a rel attribute of 'help'. Changing anchor.setAttribute(...) to anchor.setAttribute('target','_blank',0); DOES work (the link opens in a new window), so it would appear that IE doesn't like setting onlick attributes this way. Can anyone either: - suggest an alternate way to achieve this, or - suggest a good mailing list to seek further help on (like a DOM list) ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] DOM setAttribute in IE?
Hi Justin, You can also use the simpler event model and add the event as follows: anchor.onclick = function(){ alert('anchor with rel clicked'); } This works in both IE and Mozilla. For more info on events in javascript the best resource I've found is http://www.quirksmode.org Cheers, Mark On Thu, 19 Aug 2004 10:06:28 +0300, Eser 'Laroux' [EMAIL PROTECTED] wrote: You can use attachEvent method for this. But it's supported by Internet Explorer 6 only. -- a href=about:mozilla rel=helptest/a script type=text/javascript var anchors = document.getElementsByTagName('a'); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute('rel') == 'help') { anchor.attachEvent( 'onclick', function() { window.open(event.srcElement.getAttribute('href'),'popupwindow','width=400,h eight=400,scrollbars=1,resizable=1'); return false; } ); } } /script -Original Message- Here's a function: function helpLinks() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == help) { anchor.setAttribute( onclick,window.open(this.href,'popupwindow','width=400,height=400,scr ollbars,resizable'); return false;,0); } } } It works perfectly well in everything I can get my hands on except for IE, where it fails to set the onclick event to all A elements with a rel attribute of 'help'. Changing anchor.setAttribute(...) to anchor.setAttribute('target','_blank',0); DOES work (the link opens in a new window), so it would appear that IE doesn't like setting onlick attributes this way. Can anyone either: - suggest an alternate way to achieve this, or - suggest a good mailing list to seek further help on (like a DOM list) ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Job Posting
Good Morning Marc, Just want to ask before i reply but would you be tempted by someone oversea's? Im willing to relocate just dont know all the in's and out's of if i would be able to or not straight away?! Anyway thought id ask first before i submit my resume to you. Many Thanks Mark Harwood http://phunky.co.uk http://zinkmedia.co.uk On Thu, 19 Aug 2004 10:03 , Marc Greenstock [EMAIL PROTECTED] sent: I know it's not common for this list to hold job postings although we are really desperate to find someone here. From: http://jobs.careerone.com.au/search/dsp_show_job.cfm\?AD_ID=1235550 Shock Media Studios, (www.shockmedia.com.au) an Advertising and Information Technology based company, is seeking a qualified full-time Programmer with a high level of commitment to provision of consistently high standards of client service to join our Brisbane studio. The Candidate. The successful candidate will plan and develop websites, intranet, content management (CMS), eCommerce and data management systems, maintain and expand a number of established corporate websites and provide in-house information technology expertise. To be successful in this position you need to meet the following minimum criteria; using PHP technology, MySql, JavaScript, CSS HTML/XHTML; standards; The Application. Via Email. Email your resume and cover letter to [EMAIL PROTECTED] Via Phone. Shock Media Studios (07) 3254 0955 The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] DOM setAttribute in IE?
IE does not like setAttribute onClick. I had a similar problem recently. I solved it by using the correct method first (as yours) then adding a function to deal with IE after it. function onclickIE(idAttr,handler,call){ if ((document.all)(document.getElementById)){idAttr[handler]=new Function(call)} } Hope that helps mike 2k:)2 marqueeblink mike foskett /marquee/blink [EMAIL PROTECTED] http://www.webSemantics.co.uk -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: 19 August 2004 07:22 To: [EMAIL PROTECTED] Subject: [WSG] DOM setAttribute in IE? Here's a function: function helpLinks() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == help) { anchor.setAttribute( onclick,window.open(this.href,'popupwindow','width=400,height=400,scr ollbars,resizable'); return false;,0); } } } It works perfectly well in everything I can get my hands on except for IE, where it fails to set the onclick event to all A elements with a rel attribute of 'help'. Changing anchor.setAttribute(...) to anchor.setAttribute('target','_blank',0); DOES work (the link opens in a new window), so it would appear that IE doesn't like setting onlick attributes this way. Can anyone either: - suggest an alternate way to achieve this, or - suggest a good mailing list to seek further help on (like a DOM list) --- Justin French http://indent.com.au ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] DOM setAttribute in IE?
I'd suggest using Scott Andrews' addEvent helper function (see http://www.scottandrew.com/weblog/articles/cbs-events) function addEvent(obj, evType, fn, useCapture){ if (obj.addEventListener){ obj.addEventListener(evType, fn, useCapture); return true; } else if (obj.attachEvent){ var r = obj.attachEvent(on+evType, fn); return r; } else { alert(Handler could not be attached); } } This has worked for me quite consistently in the past. Patrick Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] DOM setAttribute in IE?
Also, if you assign the event using the way below (detailed by Mark) the keyword this would refer to the link so you could do this: anchor.onclick = function(){ window.open(this.href,'popupwindow','width=400,height=400,scrollbars=1,resizable=1'); return false; } rather than using event.srcElement to get the href. DO NOT USE attachEvent unless you only intend this event to occur for IE. It's non-standard - we should be working to get rid of non-standard JavaScript as well as HTML and CSS. Finally, theres no need to use setAttribute(). The better way is to reference the property directly as each link is also a Link object that makes these properties available. It's simpler and more reliable cross browser. Here's how Id rewrite it: script type=text/javascript var anchors = document.getElementsByTagName('a'); for (var i=0; ianchors.length; i++) { if (anchors[i].rel == 'help') anchors[i].onclick = function(){ window.open(this.href,'popupwindow','width=400,height=400,scrollbars=1,resizable=1'); return false; }; } /script I think now we've established standards and good practice for HTML and CSS, DOM scripting is still overlooked. PPK has established some pretty good practices but we need to go further. If anyone else has an interest in this get in contact as I'd like to take it forward in some way. Cheers, Dan Webb http://www.danwebb.net Quoting Mark Lynch [EMAIL PROTECTED]: Hi Justin, You can also use the simpler event model and add the event as follows: anchor.onclick = function(){ alert('anchor with rel clicked'); } This works in both IE and Mozilla. For more info on events in javascript the best resource I've found is http://www.quirksmode.org Cheers, Mark On Thu, 19 Aug 2004 10:06:28 +0300, Eser 'Laroux' [EMAIL PROTECTED] wrote: You can use attachEvent method for this. But it's supported by Internet Explorer 6 only. -- a href=about:mozilla rel=helptest/a script type=text/javascript var anchors = document.getElementsByTagName('a'); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute('rel') == 'help') { anchor.attachEvent( 'onclick', function() { window.open(event.srcElement.getAttribute('href'),'popupwindow','width=400,h eight=400,scrollbars=1,resizable=1'); return false; } ); } } /script -Original Message- Here's a function: function helpLinks() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName(a); for (var i=0; ianchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute(href) anchor.getAttribute(rel) == help) { anchor.setAttribute( onclick,window.open(this.href,'popupwindow','width=400,height=400,scr ollbars,resizable'); return false;,0); } } } It works perfectly well in everything I can get my hands on except for IE, where it fails to set the onclick event to all A elements with a rel attribute of 'help'. Changing anchor.setAttribute(...) to anchor.setAttribute('target','_blank',0); DOES work (the link opens in a new window), so it would appear that IE doesn't like setting onlick attributes this way. Can anyone either: - suggest an alternate way to achieve this, or - suggest a good mailing list to seek further help on (like a DOM list) ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- Dan Webb Web Developer and Internet Consultant www.danwebb.net 07957 234544 39 Roseberry Gardens, London, N8 8SH ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility,
[WSG] off topic, but needed. are there any struts users?
Hi everyone. I just wanted to know if there are any struts users that could answer a question for me off the list. We are having a problem with pages that have more than one form on them. The valditing javascripts are conflicting. If there are any struts users that might have an idea how to solve this, please send me a note at [EMAIL PROTECTED] Thanks and sorry for mucking up the list with this request. Ted ** ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG]RSS
shameless plugIf only more companies made use of the information I know by contracting me.../shameless plug -- Neerav Bhatt http://www.bhatt.id.au Web Development IT consultancy Mobile: +61 (0)403 8000 27 http://www.bhatt.id.au/blog/ - Ramblings Thoughts http://www.bookcrossing.com/mybookshelf/neerav Tricia Fitzgerald wrote: You are just a wealth of information! Tricia On Aug 18, 2004, at 4:19 PM, Neerav wrote: wordpress - http://www.wordpress.org blog package with rss feeds http://www.mnot.net/rss/tutorial/ - rss tutorial http://www.bhatt.id.au/article/1/ - generating rss with php mysql -- Neerav Bhatt http://www.bhatt.id.au - Original Message - From: Wasabi To: [EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 3:13 PM Subject: [WSG] Hi, Any good on-line tutorials for RSS ? Respectfully, Chris http://ckimedia.com ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
[WSG] cutoff bug in Safari?
Hi guys, I'm seeing a problem in Safari (1.2.3) - the kind of thing I would expect from IE :) The footer of my template isn't displaying. On long pages, the bottom of the text is cut off too - halfway through a line in fact. The scrollbar just won't go any further, and selecting the text and trying to drag down doesn't work either. The layout is a simple single column fixed width affair using absolute positioning to stuff the main navigation and masthead fluff down the bottom, out of the way of search engines. I've cut everything right down to the basics but I still can't see it, and Google is not being helpful. Has anyone seen anything like this before? http://203.59.70.252/wsg/ Thanks for any advice or pointers! -- Kay Smoljak http://kay.smoljak.com/ ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
[WSG] Unaccessible - NY Attorney General busts two big name sites
19 Aug 2004 - The Attorney General of New York has deemed parts of Ramada.com and Priceline.com inaccessible to assistive technology. The Attorney General opined that the Americans With Disabilities Act requires that private web sites be accessible to blind and visually impaired Internet users. Settlements reached will attempt to make both sites more accessible. Under the terms of the agreements, the companies will implement a range of accessibility standards authored by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), an organization that recommends Internet standards. The companies must also implement a wide variety of other initiatives, based on guidelines authored by the W3C. In addition to the steps outline above, Ramada.com and Priceline.com will pay the State of New York $40,000 and $37,500, respectively, as costs of the investigation. The Attorney General emphasized that once the companies were notified of the accessibility issues by his office, they worked cooperatively and creatively with his Internet Bureau to correct the issues. Attorney General's Press Release http://www.oag.state.ny.us/press/2004/aug/aug19a_04.html Sandy Clark's comments http://www.shayna.com/blog/index.cfm?mode=entryentry=78672CBF-CABE-65E3-306A96044957F88C John Dowdell's comments http://www.markme.com/jd/archives/005883.cfm ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Unaccessible - NY Attorney General busts two big name sites
Wow, that's big. Did we resolve whether Australian legislation has the potential for similar effects? -- Cameron W: www.themaninblue.com --- Ben Bishop [EMAIL PROTECTED] wrote: 19 Aug 2004 - The Attorney General of New York has deemed parts of Ramada.com and Priceline.com inaccessible to assistive technology. The Attorney General opined that the Americans With Disabilities Act requires that private web sites be accessible to blind and visually impaired Internet users. Settlements reached will attempt to make both sites more accessible. Under the terms of the agreements, the companies will implement a range of accessibility standards authored by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), an organization that recommends Internet standards. The companies must also implement a wide variety of other initiatives, based on guidelines authored by the W3C. In addition to the steps outline above, Ramada.com and Priceline.com will pay the State of New York $40,000 and $37,500, respectively, as costs of the investigation. The Attorney General emphasized that once the companies were notified of the accessibility issues by his office, they worked cooperatively and creatively with his Internet Bureau to correct the issues. Attorney General's Press Release http://www.oag.state.ny.us/press/2004/aug/aug19a_04.html Sandy Clark's comments http://www.shayna.com/blog/index.cfm?mode=entryentry=78672CBF-CABE-65E3-306A96044957F88C John Dowdell's comments http://www.markme.com/jd/archives/005883.cfm ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] Unaccessible - NY Attorney General busts two big name sites
Wow, that's big, can't believe they had to pay $40,000 that's huge. Tim Hill Computer Associates Graphic Artist tel: +612 9937 0792 fax: +612 9937 0546 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Bishop Sent: Friday, 20 August 2004 2:37 PM To: [EMAIL PROTECTED] Subject: [WSG] Unaccessible - NY Attorney General busts two big name sites 19 Aug 2004 - The Attorney General of New York has deemed parts of Ramada.com and Priceline.com inaccessible to assistive technology. The Attorney General opined that the Americans With Disabilities Act requires that private web sites be accessible to blind and visually impaired Internet users. Settlements reached will attempt to make both sites more accessible. Under the terms of the agreements, the companies will implement a range of accessibility standards authored by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), an organization that recommends Internet standards. The companies must also implement a wide variety of other initiatives, based on guidelines authored by the W3C. In addition to the steps outline above, Ramada.com and Priceline.com will pay the State of New York $40,000 and $37,500, respectively, as costs of the investigation. The Attorney General emphasized that once the companies were notified of the accessibility issues by his office, they worked cooperatively and creatively with his Internet Bureau to correct the issues. Attorney General's Press Release http://www.oag.state.ny.us/press/2004/aug/aug19a_04.html Sandy Clark's comments http://www.shayna.com/blog/index.cfm?mode=entryentry=78672CBF-CABE-65E3 -306A96044957F88C John Dowdell's comments http://www.markme.com/jd/archives/005883.cfm ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **