Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 42
  1. #16
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    Ah! and none deleted would also be possible, I guess

    If the time is stored as milliseconds since 1970, This might be the easiest solution:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta charset="windows-1252">
    <style>
    #sessions { font-family:"Courier New" }
    </style>
    <script>
    function sortsegments(a,b){
      A=a.substring(3,16);
      B=b.substring(3,16);
      return (A>B?1:B>A?-1:0);
    }
    function saveCookie(){
      cookiestring='';
      for (var C=0;C<SaveCheck.length;C++){
        if (SaveCheck[C].checked){
          cookiestring+= Sessions[C];
        }
      }
    document.getElementById('CS').innerHTML=cookiestring; // replace with setcookie call
    }
    </script></head>
    <body>
    <div id="sessions">
    </div>
    <button onclick="saveCookie()">Save</button>
    <div id="CS"></div> <!-- Remove -->
    
    <script>
      var Sessionlist=document.getElementById('sessions');
      var Datestring=[]
      var SaveCheck=[];
      var SaveText=[];
      var store = "124140464512000011111111111111111111R15137300844000021515544455315341222413134165976000033333333333333333333R21140472420000024125113225215151434";
    //var store = readCookie('mycookie'); // add the function to the document
      var Sessions = store.match(/.{1,36}/g);
      Sessions.sort(sortsegments)
    for (S=0;S<Sessions.length;S++){
      temp = new Date(parseInt(Sessions[S].substring(3,16))).toString();
      Datestring.push(temp.substring(0,temp.indexOf('GMT')-1));
      SaveCheck[S]=document.createElement('input');
      SaveCheck[S].setAttribute('type','checkbox');
      SaveText[S]=document.createElement('span');
      SaveText[S].textContent=Datestring[S];
      br=document.createElement('br');
      Sessionlist.appendChild(SaveCheck[S]);
      Sessionlist.appendChild(SaveText[S]);
      Sessionlist.appendChild(br);
    }
    </script>
    </body>
    </html>
    I guess it could be shortened, but you might get the idea.

  2. #17
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    It's a beautiful thing, Lerura. I didn't think I could use the time stored this way because it would vary in length. But I seem to be wrong. You are always making it 13 characters in length.

    I'm thinking I can use this marvellous solution if I can be certain that when storing the string "mycookie", its segments will always be the same length:

    123 1234567890123 12345678901234567890

    At present, the date I create is done the long way (always 12 chars):

    Code:
    var d = new Date();
    var month = (d.getMonth()).toString();
    	if ((month.length)< 2) {
    	var month = "0" + month;
    	}
    var date = (d.getDate()).toString();
    	if ((date.length)< 2) {
    	var date = "0" + date;
    	}
    var year = d.getFullYear().toString();
    var hour = (d.getHours()).toString();
    	if ((hour.length)< 2) {
    	var hour = "0" + hour;
    	}
    var minute = (d.getMinutes()).toString();
    	if ((minute.length)< 2) {
    	var minute = "0" + minute;
    	}
    var mydate = month + date + year + hour + minute;
    Can I be certain that the date in UTC format can always be output as the same no. of characters?
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  3. #18
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    Quote Originally Posted by tpeck View Post
    You are always making it 13 characters in length.
    Until Nov 20 2286 the number of milliseconds since Jan 1 1970 00:00 will always automatically be a 13 digit number.
    So there would only be a problem if you have plans on living longer than that.

  4. #19
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    Attempting to place your code, Lerura, in my page with some but not complete success.

    The appropriate relevant portion of my original code is:

    Code:
    <script>
    var session = readCookie('mycookie');
    	if(! session){ // no stored sessions (null)
    	document.write("<i>NO USER STORED SESSIONS</i>");
    	}
    	else {
    	var sessionlen = session.length;
    	var s = (session.length /= 35); // no. of sessions saved
    		for(i = 0; i < s; i++){
    		var type = session.substr((i*35), 1); // session type
    		var mf = session.substr(((i*35)+1), 1); // male or female
    		var bg = session.substr(((i*35)+2), 1); // background
    		var time = session.substr(((i*35)+3), 12); // session time
    		var segm = session.substr(((i*35)+15), 20); // session segments
    		var newsession = type + mf + bg + time + segm;
    document.write("<input type=\"checkbox\" onclick=\"loseMypreset(value, this);\" id=\"box" + (i+1) + "\" name=\"session\" value=\"" + i + "\" checked \/>");		
    document.write("&nbsp;<img class=\"pointer\" src=\"images\/bmp_play.png\" onclick=\"replaySession('" + type+i + "')\" title=\"replay\" alt=\"replay\" width=\"16\" height=\"16\" \/>&nbsp;");
    var weekdays = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
    var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
    
    var mn = + time.substr(0, 2); // month
    var dt = + time.substr(2, 2); // date
    var yr = + time.substr(4, 4); // year
    var hr = + time.substr(8, 2); // hour
    var mi = + time.substr(10, 2); // minute
    
    var t = new Date( yr, mn, dt, hr, mi, 0 );
    
    hr = t.getHours();
    var ampm = hr >= 12 ? "pm " : "am ";
    if ( hr > 12 ) hr -= 12;
    if ( hr == 0 ) hr = 12;
    mi = t.getMinutes();
    if ( mi < 10 ) mi = "0" + mi;
    var sec = t.getSeconds();
    if ( sec < 10 ) sec = "0" + sec;
    var prettyDate = weekdays[t.getDay()] + " " + months[t.getMonth()] + " " + t.getDate() + ", " + t.getFullYear() + " " + hr + ":" + mi + " " + ampm;
    document.write("" + prettyDate + "");
    
    if (mf == 1) {
    document.write("&nbsp;&nbsp;<img src=\"images\/male.png\" title=\"Male voice\" alt=\"Male voice\" width=\"16\" height=\"16\" \/>");
    }
    else {
    document.write("&nbsp;&nbsp;<img src=\"images\/female.png\" title=\"Female voice\" alt=\"Female voice\" width=\"16\" height=\"16\" \/>");
    }
    if (bg == 1) {
    document.write("&nbsp;&nbsp;(silent)");
    }
    else if (bg == 2){
    document.write("&nbsp;&nbsp;(ocean waves)");
    }
    else if (bg == 3){
    document.write("&nbsp;&nbsp;(forest)");
    }
    else if (bg == 4){
    document.write("&nbsp;&nbsp;(meditative)");
    }
    else if (bg == 5){
    document.write("&nbsp;&nbsp;(orchestral)");
    }
    else if (bg == 6){
    document.write("&nbsp;&nbsp;(piano)");
    }
    if (type == 'R') {
    document.write("&nbsp;&nbsp;<img src=\"images\/R.png\" title=\"random session\" alt=\"random session\" width=\"16\" height=\"16\" \/>");
    }
    else if (type == 1) {
    document.write("&nbsp;&nbsp;<img src=\"images\/P1.png\" title=\"preset session#1\" alt=\"preset session#1\" width=\"16\" height=\"16\" \/>");
    }
    else if (type == 2) {
    document.write("&nbsp;&nbsp;<img src=\"images\/P2.png\" title=\"preset session#2\" alt=\"preset session#2\" width=\"16\" height=\"16\" \/>");
    }
    else if (type == 3) {
    document.write("&nbsp;&nbsp;<img src=\"images\/P3.png\" title=\"preset session#3\" alt=\"preset session#3\" width=\"16\" height=\"16\" \/>");
    }
    else if (type == 4) {
    document.write("&nbsp;&nbsp;<img src=\"images\/P4.png\" title=\"preset session#4\" alt=\"preset session#4\" width=\"16\" height=\"16\" \/>");
    }
    else if (type == 5) {
    document.write("&nbsp;&nbsp;<img src=\"images\/P5.png\" title=\"preset session#5\" alt=\"preset session#4\" width=\"16\" height=\"16\" \/>");
    }
    document.write("<br>");
    		}
    	}	
    </script>
    I now have:

    Code:
    <div id="sessions">
    </div>				
    <script type="text/javascript">
    var Sessionlist=document.getElementById('sessions');
    var Datestring=[]
    var SaveCheck=[];
    var SaveText=[];
    var store = readCookie('mycookie');
    	if(! store) { // no stored sessions (null)
    	document.write("<i>NO USER STORED SESSIONS</i>");
    	}
    	else {  
    	var Sessions = store.match(/.{1,36}/g);
    	Sessions.sort(sortsegments)
    	for (S=0;S<Sessions.length;S++){
    	temp = new Date(parseInt(Sessions[S].substring(3,16))).toString();
    	Datestring.push(temp.substring(0,temp.indexOf('GMT')-1));
    	SaveCheck[S]=document.createElement('input');
    	SaveCheck[S].setAttribute('type','checkbox');
    	SaveText[S]=document.createElement('span');
    	SaveText[S].textContent=Datestring[S];
    	br=document.createElement('br');
    	Sessionlist.appendChild(SaveCheck[S]);
    	document.write("&nbsp;<img class=\"pointer\" src=\"images\/bmp_play.png\" onclick=\"replaySession('" + type+i + "')\" title=\"replay\" alt=\"replay\" width=\"16\" height=\"16\" \/>&nbsp;");
    	Sessionlist.appendChild(SaveText[S]);
    	Sessionlist.appendChild(br);
    	}
    	}	
    </script>
    I'm trying to add the play button after the checkbox (as in the original). I'm not familiar with creating elements this way. Please, how should I go about it? Then I have to add images depending on conditions. Can I place if else conditions inside this Sessionlist?
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  5. #20
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta charset="windows-1252">
    <style>
    #sevssions { font-family:"Courier New" }
    </style>
    <script>
    var TypeImage = [], TypeTitAlt = [], BG = [], MfImage = [], MfTitAlt = [];
    
    TypeImage['R']='images/R.png';    TypeTitAlt['R']='random session';
    TypeImage['1']='images/P1.png';   TypeTitAlt['1']='preset session#1';
    TypeImage['2']='images/P2.png';   TypeTitAlt['2']='preset session#2';
    TypeImage['3']='images/P3.png';   TypeTitAlt['3']='preset session#3';
    TypeImage['4']='images/P4.png';   TypeTitAlt['4']='preset session#4';
    TypeImage['5']='images/P5.png';   TypeTitAlt['5']='preset session#5';
    
    BG['1']=' (silent) '
    BG['2']=' (ocean waves) '
    BG['3']=' (forest) '
    BG['4']=' (meditative) '
    BG['5']=' (orchestral) '
    BG['6']=' (piano) ';
    
    MfImage['1']='images/male.png';     MfTitAlt['1'] = 'Male Voice';
    MfImage['2']='images/female.png';   MfTitAlt['2'] = 'Female Voice';
    
    var weekdays = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
    var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
    
    function getAMPMstring(val){
      Yr= val.getFullYear();
      Mt= val.getMonth();
      Dt= val.getDate();
      Dy= val.getDay();
      Hr= val.getHours();
      AmPm = (Hr>12?'PM':'AM');
      Hr= (Hr==0?12:Hr>12?Hr-12:Hr);
      Hr= (Hr<10?'0':'')+Hr;
      Mn= val.getMinutes()
      Mn= (Mn<10?'0':'')+Mn;
      return " " + weekdays[Dy] + " " + months[Mt] + " " + Dt + ", " + Yr + " " + Hr + ":" + Mn + " " + AmPm;
    }
    </script>
    <script>
    function sortsegments(a,b){
      A=a.substring(3,16);
      B=b.substring(3,16);
      return (A>B?1:B>A?-1:0);
    }
    function saveCookie(){
      cookiestring='';
      for (var C=0;C<SaveCheck.length;C++){
        if (SaveCheck[C].checked){
          cookiestring+= Sessions[C];
        }
      }
    document.getElementById('CS').innerHTML=cookiestring; // replace with setcookie call
    }
    </script></head>
    <body>
    <div id="sessions">
    </div>
    <button onclick="saveCookie()">Save</button>
    <div id="CS"></div> <!-- Remove -->
    
    <script>
      var Sessionlist=document.getElementById('sessions');
      var TypePic=[]
      var GenderPic=[];
      var Time=[];
      var SaveCheck=[];
      var Background=[];
      var store = "124140464512000011111111111111111111R15137300844000021515544455315341222413134165976000033333333333333333333R21140472420000024125113225215151434";
    //var store = readCookie('mycookie'); // add the function to the document
      var Sessions = store.match(/.{1,36}/g);
      Sessions.sort(sortsegments)
    for (S=0;S<Sessions.length;S++){
    
    type = Sessions[S].substr(0,1);
    gender=Sessions[S].substr(1,1);
    bg=Sessions[S].substr(2,1);
    time=Sessions[S].substr(3,13);
    
      TypePic[S] = document.createElement('img');
      TypePic[S].src = TypeImage[type];
      TypePic[S].setAttribute('title',TypeTitAlt[type]);
      TypePic[S].setAttribute('alt',TypeTitAlt[type]);
      TypePic[S].style="height:16px;width:16px";
      GenderPic[S] = document.createElement('img');
      GenderPic[S].src = MfImage[gender];
      GenderPic[S].setAttribute('title',MfTitAlt[gender]);
      GenderPic[S].setAttribute('alt',MfTitAlt[gender]);
      GenderPic[S].style="height:16px;width:16px"
      SaveCheck[S]=document.createElement('input');
      SaveCheck[S].setAttribute('type','checkbox');
      Time[S]=document.createElement('span');
      Time[S].textContent=getAMPMstring(new Date(parseInt(time)));
      Background[S]=document.createElement('span');
      Background[S].textContent=BG[bg];
      br=document.createElement('br');
      Sessionlist.appendChild(SaveCheck[S]);
      Sessionlist.appendChild(GenderPic[S]);
      Sessionlist.appendChild(Background[S]);
      Sessionlist.appendChild(TypePic[S]);
      Sessionlist.appendChild(Time[S]);
      Sessionlist.appendChild(br);
    }
    </script>
    </body>
    </html>
    The Blue part is a kind of replacement for an if statement.
    By specifying the value to use, one for each of the possible conditions

    The Red part is a function that returns a datestring based on the timestring

    The Orange part extracts the data for the current Session

    The Green part creates the elements and adds content/attributes based on the Blue part.

    The Purple Part adds the element to the div

  6. Users who have thanked Lerura for this post:

    tpeck (08-08-2014)

  7. #21
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    Oh, so much to study! It's all new to me. Neat and tidy. Concise, condensed. Hope it didn't take too long. I'm going to figure it out and use these ideas in half a dozen other situations. Not a document.write in sight. Javascript really is amazing stuff.
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  8. #22
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    How do you add a space or two before/after certain display items?

    I've tried this:

    Code:
    SP='     '
    ********
    var Space=[];
    ...
    	Space[S]=document.createElement('span');
    	Space[S].textContent=SP;	
     	br=document.createElement('br');
    	Sessionlist.appendChild(SaveCheck[S]);
    	Sessionlist.appendChild(Space[S]);
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  9. #23
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,983
    Thanks
    56
    Thanked 557 Times in 554 Posts
    most likely you would do it with CSS, not javascript unless there is some particular reason not to

  10. #24
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    OK, I've tried everything known to man (except the solution) to create whitespace padding right side of the text and images. I give up.
    Thinking of taking up french knitting.
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  11. #25
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    Quote Originally Posted by tpeck View Post
    Hope it didn't take too long.

    It took a while, but was actually quite easy to write.
    I use a similar build up in many of my projects s a lot of it is slighty modified C&P'ed sections from there.

    I find that using a kind of conditional database instead of a mostly nested flood of if and if else statement, is far more manageable.

    compare:
    Code:
    var a = 0, b = 2;
    var BgColor = [];
    BgColor[0] = ['blue', 'red', 'green'];
    BgColor[1] = ['yellow', 'cyan', 'magenta'];
    BgColor[2] = ['black', 'white', 'grey'];
    document.backgroundColor = BgColor[ a ][ b ];
    to:
    Code:
    var a = 0, b = 2;
    if ( a == 0 && b == 0 ){
     document.backgroundColor = 'blue';
    }
    else if ( a == 0 && b == 1 ){
     document.backgroundColor = 'red';
    }
    else if ( a == 0 && b == 2 ){
     document.backgroundColor = 'green';
    }
    else if ( a == 1 && b == 0 ){
     document.backgroundColor = 'yellow';
    }
    else if ( a == 1 && b == 1 ){
     document.backgroundColor = 'cyan';
    }
    else if ( a == 1 && b == 2 ){
     document.backgroundColor = 'magenta';
    }
    else if ( a == 2 && b == 0 ){
     document.backgroundColor = 'black';
    }
    else if ( a == 2 && b == 1 ){
     document.backgroundColor = 'white';
    }
    else if ( a == 2 && b == 2 ){
     document.backgroundColor = 'grey';
    }
    And for the issue with spaces:
    Html by default collapses multi spaces into one.

    You can add a class name to the elements by adding the line:
    element.className= 'classname' in the dom creation like:
    Code:
      SaveCheck[S]=document.createElement('input');
      SaveCheck[S].setAttribute('type','checkbox');
      Time[S]=document.createElement('span');
      Time[S].textContent=getAMPMstring(new Date(parseInt(time)));
      Time[S].className='rightSpace';
      Background[S]=document.createElement('span');
      Background[S].textContent=BG[bg];
    and then:
    Code:
    .rightSpace { margin-right: 2em; }
    and if you want to have space after all elements you dont need to add a class to the elements, but can simply do:
    Code:
    #sessions > * { margin-right : 2em ; }
    Last edited by Lerura; 08-09-2014 at 03:11 AM.

  12. #26
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    Yes, that works. I didn't know to try that method. Again, thanks.

    There is one error, though, I have discovered (bug?). The lines with the style:

    Code:
    TypePic[S].style="height:16px;width:16px"; etc.
    ...that style doesn't seem to be written out. I checked it in firebug. It just gets skipped in the html.
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  13. #27
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    That one is on me. I mistakenly remembered it as being used similar to .src
    But .style is only a keyword (or whatever the right term is) telling javascript that we are now dealing with css. Unlike .src that refers to the src attribute

    The right way to do it:
    Code:
    TypePic[S].setAttribute('style', 'height:16px;width:16px;' );

  14. #28
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    No worries! You have helped me more than enough already. I was trying to replicate this:

    Code:
    document.write("&nbsp;<img class=\"pointer\" src=\"images\/bmp_play.png\" onclick=\"replaySession('" + type+i + "')\" title=\"replay\" alt=\"replay\" width=\"16\" height=\"16\" \/>&nbsp;");
    ...but realised the onclick (which is vital) would not work if part of a style.

    I still might fail, but I'm going for it tomorrow morning...
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)

  15. #29
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    First let me correct my teaching to avoid confusion: ( current family issues have distracted me a lot lately )

    All element attributes, including custom, can be set by element.setAttribute("attrName", "attrValue");
    All element attributes that are covered by javascript can be set by element.attrName="attrvalue";

    But as always there are exceptions:
    among them is the style attribute:

    Before the element is appended to the document tree, you cannot use element.style="attrvalue"; but it can be used after:
    But you can use element.setAttribute("style", "attrValue"); both before and after appending the element.

    Unfortunately I do not have a complete list of exceptions.


    And there is a problem with this string:
    You have:
    Code:
    document.write(" <img"pointer\" src=\"images\/bmp_play.pn ..........
    either the red part has for some reason sneaked in here, or something has sneaked out.
    it would make sense if it was:
    Code:
    document.write(" <img src=\"images\/bmp_play.pn ..........
    or:
    Code:
    document.write(" <img class=\"pointer\" src=\"images\/bmp_play.pn ..........
    and I guess it the last.

    In that case we do:
    Code:
    PlayImage[S]=document.createElement('img');
    PlayImage[S].setAttribute('class','pointer');
    PlayImage[S].setAttribute('title','replay');
    PlayImage[S].setAttribute('alt','replay');
    PlayImage[S].setAttribute('style','height:16px;width:1px;');
    PlayImage[S].setAttribute('onclick',"replaySession(" +type + i + "')");
    Notice that the attrValue can, just as with document.write be constructed as a combination of variables and string.

    and if the odd string is a class name then you can skip setting the style attribute and add the values to a stylesheet instead

    And last comes: What must type + i result in:
    If it is as shown on one of your attacked images, R for random session and Px for preset sesions:
    Code:
    Replay = [];
    Replay['R']='R';
    Replay['1']='P1;
    Replay['2']='P2';
    Replay['3']='P3';
    Replay['4']='P4';
    Replay['5']='P5';
    and replace the blue line above with
    Code:
    PlayImage[S].setAttribute('onclick',"replaySession(" +Replay[type] + "')");
    Last edited by Lerura; 08-10-2014 at 02:50 AM.

  16. #30
    Regular Coder tpeck's Avatar
    Join Date
    Oct 2002
    Location
    Sydney, Australia
    Posts
    882
    Thanks
    53
    Thanked 6 Times in 5 Posts
    Lerura, I have a question about how to make the checkboxes checked. I tried this which does not error, but no luck:

    Code:
    SaveCheck[S] = document.createElement('input');
    SaveCheck[S].setAttribute('id',"box" + (S+1) + "");
    SaveCheck[S].setAttribute('type','checkbox');
    SaveCheck[S].setAttribute('onclick',"loseMypreset(value, this);");
    SaveCheck[S].setAttribute('value',"" + S + "");			
    SaveCheck[S].attrName="checked /";
    The other lines all work well. (Interesting how they create their own order regardless of where you place them.)
    The difference between genius and stupidity is that genius has its limits. (Albert Einstein)


 
Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •