RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1233 | Replies: 8
Reply
Join Date: Mar 2008
Posts: 12
Reputation: littlegreen is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
littlegreen littlegreen is offline Offline
Newbie Poster

Multiple items with the same id problem (edit-in-place)

  #1  
Mar 3rd, 2008
Hi all,
Actually, I had posted a thread in the php forum. But I don't know the javascripts and AJAX very well, so would like ask for help from anyone here.

The code below is originally from edit-in-place scripts. But this didn't work for my case. Does anyone know about this?

inside editinplace.js
function init(){
var max=50;
for(i=1; i<max; i++){
makeEditable('item_'+i ; );
} 
}

Thanks in advance.
Last edited by littlegreen : Mar 3rd, 2008 at 12:56 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,640
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 118
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Multiple items with the same id problem (edit-in-place)

  #2  
Mar 3rd, 2008
You can't have multiple items with the same id. It is a W3C violation.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Mar 2008
Posts: 12
Reputation: littlegreen is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
littlegreen littlegreen is offline Offline
Newbie Poster

Re: Multiple items with the same id problem (edit-in-place)

  #3  
Mar 4th, 2008
Hi MidiMagic,
ya I just know about that. But what should I do with the multiple id and the javascripts code? Since I have to loop it, that is harder for me without using a while. Besides that, I'm very poor in javascripts. Can you help on this? Thank you very much.
Reply With Quote  
Join Date: Jan 2008
Location: India
Posts: 178
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 8
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Multiple items with the same id problem (edit-in-place)

  #4  
Mar 5th, 2008
hi
you can access multiple controls as...
For i = 8 to 13
		
		fileName   = LCase(load.getFileName("file" & i ))

Got it?
Accept Challenges and Enjoy Coding... :)
Reply With Quote  
Join Date: Mar 2008
Posts: 12
Reputation: littlegreen is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
littlegreen littlegreen is offline Offline
Newbie Poster

Re: Multiple items with the same id problem (edit-in-place)

  #5  
Mar 5th, 2008
Originally Posted by sbv View Post
hi
you can access multiple controls as...
For i = 8 to 13
		
		fileName   = LCase(load.getFileName("file" & i ))

Got it?


Hi sbv,
Thanks, but i don't get what you mean (forgive me because I'm quite blur)? mm.. is it related to uploading files? If that is the case, I don't need to upload any file.. and where should I place your code? the code you provided is in what language? ASP? For your information, I'm using PHP. Thanks.
Reply With Quote  
Join Date: Jan 2008
Location: Bangalore, India
Posts: 337
Reputation: DangerDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 33
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Whiz

Re: Multiple items with the same id problem (edit-in-place)

  #6  
Mar 5th, 2008
Multiple items with the same id problem (edit-in-place)
this is your heading but you are telling you are using PHP. id is used at client side programming.

so what is actually your problem ????

what you want to do in PHP ??
your exact problem definition will help us to answer you quickly.

what ever sbv ^ has posted is a way to solve id problem. using this example you can solve your id problem. this is not the exact solution but a way how probably you can solve same id problem.
Last edited by DangerDev : Mar 5th, 2008 at 9:38 am.
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
~Mitch Ratcliffe
Reply With Quote  
Join Date: Mar 2008
Posts: 12
Reputation: littlegreen is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
littlegreen littlegreen is offline Offline
Newbie Poster

Re: Multiple items with the same id problem (edit-in-place)

  #7  
Mar 5th, 2008
oh i see, because I don't really familiar of that code. mm.. maybe I should put edit-in-place using AJAX, Javascripts, and PHP problem. I'm sorry to confusing all.
Reply With Quote  
Join Date: Jan 2008
Location: India
Posts: 178
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 8
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: Multiple items with the same id problem (edit-in-place)

  #8  
Mar 6th, 2008
So did you get the solution yet or not. If no then please elaborate your need.

Best Luck
Accept Challenges and Enjoy Coding... :)
Reply With Quote  
Join Date: Mar 2008
Posts: 12
Reputation: littlegreen is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
littlegreen littlegreen is offline Offline
Newbie Poster

Re: Multiple items with the same id problem (edit-in-place)

  #9  
Mar 6th, 2008
Originally Posted by sbv View Post
So did you get the solution yet or not. If no then please elaborate your need.

Best Luck


Thanks, sbv. I had done what I want but there's another problem with me. There's a error on the page icon appears in my ie browser when i view the page. I don't know why...

inside the editinplace.js,
function init(){
var max=50;
for(i=1; i<max; i++){
makeEditable('item_'+i ); // after i remove the semicolon, i can get what i need. but i get the error on the page icon in the left bottom of the browser.
} 
}
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)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:05 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC