Home
Extended ECM
API, SDK, REST and Web Services
Oscript-object in HTML/Java-Script
Johann_Lazarus_(sglcadmin13_-_(deleted))
Hi !I Like to add a Oscript-object like:'`data.contents[1].name`'in my hmtl-java-script, but the [1] must be flexible according to a var in the java script.how do i need to write this, that i am able to ask the oscript-object likefor (ii=0; ii=max; ii++) {picture[ii]='`data.contents[ii].name`'File[ii]='`data.contents[ii].Filetype`'}???????? Please Help me Thanks a lotMarco
Find more posts tagged with
Comments
Sander_Hofman_(shofman@opentext.com_(Delete)_24724
Message from Sander Hofman via eLinkUse round brackets in the square brackets. Like this:`data.contents[(ii)].name``data.contents[(ii)].Filetype`Cheers-----Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: Thursday, March 25, 2004 5:29 PMTo: eLink RecipientSubject: Oscript-object in HTML/Java-ScriptOscript-object in HTML/Java-ScriptPosted by Wallig, Marco on 03/25/2004 11:27 AMHi !I Like to add a Oscript-object like:'`data.contents[1].name`'in my hmtl-java-script, but the [1] must be flexible according to a var inthe java script.how do i need to write this, that i am able to ask the oscript-object likefor (ii=0; ii=max; ii++) {picture[ii]='`data.contents[ii].name`'File[ii]='`data.contents[ii].Filetype`'}???????? Please Help me Thanks a lotMarco[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Johann_Lazarus_(sglcadmin13_-_(deleted))
Dear Sander Hofman!It is not working.If i test it i get the error:The name 'ii' is not known at this point. Please check your spelling and compile again.Any other idea ??ThanksMarco
Francisco_Alcala-Soler_(iaea_001user3_-_(deleted))
Message from via eLinkHi Marco,> It is not working.> If i test it i get the error:> The name 'ii' is not known at this point. Please check your > spelling and compile again.I think what you're trying is not supposed to work, because Oscript is runon the server way before you're JavaScript is executed on the client(browser). Thus, the index used in your JavaScript will not exist whenthe Oscript is being executed.One possible way to do what you intend is to do the looping in Oscript, inorder to produce a set of JavaScript calls to populate your JavaScriptarrays: ;for (ii=0; ii=Length(data.contents); ii++) picture[`ii`]='`data.contents[ii].name`' File[`ii`]='`data.contents[ii].Filetype`' ;endI haven't checked the syntax, but I hope you get the idea. You'd be gettingJavaScript in your page like this: picture[0]='value_of_name_0' File[0]='value_of_Filetype_0' picture[1]='value_of_name_1' File[1]='value_of_Filetype_1' ...which effectively populates your JavaScript array.Hope this helps, CurroThis email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.
Johann_Lazarus_(sglcadmin13_-_(deleted))
Dear "F.Alcala-Soler@iaea.org" !!Its Done !! Thanks for your hint !!It should be like this:;integer ii=1;for ii=1 to l;if (data.contents[ii].filetype=="jpg" || data.contents[ii].filetype=="gif") bild[`ii`]='`data.contents[ii].name`'; bildid[`ii`]='`data.contents[ii].Dataid`'; bildtype[`ii`]='`data.contents[ii].Filetype`'; leer++; ;end;endJust for your Information:I make a slide-Show. On every Page there is a checkbox for the slideshow. The Program checks all jpg and gif-files and present them in a slideshow and when you click on the picture it will be enlarged in an seperate window.ThanksMarco