User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 392,042 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,288 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1832 | Replies: 3 | Solved
Reply
Join Date: Feb 2008
Posts: 19
Reputation: m.cliter is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
m.cliter m.cliter is offline Offline
Newbie Poster

YUI Library Examples

  #1  
Feb 8th, 2008
Hi
I don't know if this is the right place to post my problem.
I m new to YUI, I ve modified the exemple listed here
http://developer.yahoo.com/yui/examp...ced_clean.html
well, FireFox and Opera diplay what I want, but as always the IE drive me nut, and this time IE7/IE6 gives me errors,
I did few changes
...
<body class=" yui-skin-sam">
<div id="markup">
<table id="ex" >
<thead>
<tr>
<th>Name</th>
<th>city</th>
<th>Viseted</th>
<th>Date</th>
<th>Otption</th>
</tr>
</thead>
<tbody>

<tr>
<td><a href="#nogo">roja</a></td>
<td>marbella</td>
<td>418</td>
<td>08/08/2008</td>
<td><a href="#nogo"><b>add</b></a></td>
</tr>
</tbody>

</table>
</div>
<script type="text/javascript">
YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.EnhanceFromMarkup = new function() {
var myColumnDefs = [
{key:"name",label:"Name",sortable:true},
{key:"city",label:"City", sortable:true},
{key:"visited",label:"Visited",sortable:true},

{key:"date",label:"Date",formatter:YAHOO.widget.DataTable.formatDate,sortable:tr\
ue},
{key:"option",label:"Option",sortable:false},

];


this.myDataSource = new
YAHOO.util.DataSource(YAHOO.util.Dom.get("ex"));
this.myDataSource.responseType =
YAHOO.util.DataSource.TYPE_HTMLTABLE;
this.myDataSource.responseSchema = {
fields: [
{key:"name"},
{key:"city"},
{key:"visited"},
{key:"date",parser:YAHOO.util.DataSource.parseDate},
{key:"option"},
]
};

this.myDataTable = new YAHOO.widget.DataTable("markup",
myColumnDefs, this.myDataSource,
{sortedBy:{key:"date",dir:"desc"}});
};

});
</script>
...
I ve spent the whole day trying to fix the error, Can you point me to the error?
thanks.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,775
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: YUI Library Examples

  #2  
Feb 8th, 2008
Asking your question in the official YUI forum/newsgroup would be more beneficial IMO since almost everyone here uses his/her choice of Javascript library.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Feb 2008
Posts: 19
Reputation: m.cliter is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
m.cliter m.cliter is offline Offline
Newbie Poster

Re: YUI Library Examples

  #3  
Feb 9th, 2008
I asked my question there, and I got the answer
Don't put that last comma in the column definitions and fields arrays.
Instead of ignoring it, IE assumes an extra undefined element in the array,
after the comma, so it reports the length of the array one element longer
than it should, making many loops fail.

Satyam
thanks for your reply
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,775
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: YUI Library Examples

  #4  
Feb 9th, 2008
Glad I could point you in the right direction. :-)
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC