OZONE Asylum
Forums
DHTML/Javascript
How do I code Javascript unobstru..unostrub...unobs..uno..u n o b t r u s i v e l y
This page's ID:
30385
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Indeed, [url=http://icant.co.uk/]Chris[/url] [url=http://www.wait-till-i.com/]Heilmann[/url] really knows his thing about unobstrive JavaScript and accessibility. And he's a cool guy too. Web pages/applications should NOT require JavaScript in order to work. Regarding your very example, you should remove the [i]onclick[/i] event from the markup and make a simple REST API to delete the contacts, e.g: [b] /contact/<contactId>/delete[/b] to delete the contact [b]<contactId>[/b], and change your [i]_createRow[/i] method as seen below [code]function _createRow($data) { $xhtml = '<div id="rowid'.$data['id'].'" >'.$data['name'].' - Contact Details:'.$data['contact'].'</div>'; $xhtml .= '<a href="/contact/'.$data['id'].'/delete">delete</a>'; return $xhtml; }[/code]When the [i]load[/i] event of the page kicks in, look for the links using your REST API and AJAXify them at will. Note that your markup itself looks a bit rough. Surely there is a more semantic way to mark this up. Hope that helps, [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 07-02-2008 11:36)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »