Jump to content

GBS

Members
  • Posts

    108
  • Joined

  • Last visited

    Never

Everything posted by GBS

  1. Hello to all,, Many things to the team, Thanks again for this cool forum, & have some fun over there,,, l8tr,,
  2. Hi, maybe try to do something like: <button onClick="javascript:testing()" >click here to go on</button> & the javascript part could be: [code] function testing() { window.open("your_page.html","the_page","width=310,height=400,left=320,top=0"); } [/code] hoping it helps, l8tr,,
  3. Hi there, Not sure to get it all well, (my english) but,... Maybe if the "destination" is a div/container, instead of a 'textarea', you could have the expected result, Something like: ----------- html part: <div id="mydiv"></div> & js part: document.getElementById('mydiv').innerHTML="<img src='yoursmile.gif' onclick='whatUwant()'>"; ----------- To try,, & hoping it helps, l8tr,,
  4. Hi, Try something like this: [code] <html> <body> <script language="JavaScript"> function ChangePicture(imgSrc) { var new_contains="<img id=\"large_picture\">"; document.getElementById('contains').innerHTML=new_contains; document.getElementById('large_picture').src=imgSrc; } function ChangeFlash(flashSrc) { var to_embed="<embed src=\""+flashSrc+"\" quality=\"high\" bgcolor=\"black\" align=\"center\" width=\"296\" height=\"110\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>'"; document.getElementById('contains').innerHTML=to_embed; } </script> changing images,, <a href="javascript:ChangePicture('pics/flora10.jpg');">01</a> <a href="javascript:ChangePicture('pics/flora9.jpg');">02</a> & flash files: <a href="javascript:ChangeFlash('bdm_player.swf');">03</a> <div id="contains"> <img id="large_picture" src="pics/flora9.jpg"> </div> </body> </html> [/code] Hoping it helps,, l8tr,
  5. Hi, in IE you could try some script like: [code] <html> <body> <script language="JavaScript"> var bookmarkurl="http://www.testing_bookmarks.com/";var bookmarktitle="testing"; function addbookmark(){ if (document.all);window.external.AddFavorite(bookmarkurl,bookmarktitle) } document.write('<a href="javascript:addbookmark()">Add testing to your favorites</a>, or<br>') </script> <a class="chlnk" style="text-decoration:underline;cursor:pointer;color:#0000FF;" HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.testing_bookmarks.com/');">set your homepage to testing.</a> </body> </html> [/code] But this doesn't work with firefox,, With ff, maybe check the link: [url=http://support.milonic.com/demos/addtosidebar/index.htm]http://support.milonic.com/demos/addtosidebar/index.htm[/url] & then, the idea could be to detect the browser, & use the correct functions depending of the browser client, Hoping it helps,, l8tr,
  6. Hi, I've taken the start of your code & made some few modifications, The idea was to add a second scroll text, & make it start once the first scroll is off. And then start the first scroll again & init the second, and so on,,... [code]<html> <head> <style> #mq1 { border:solid 1px red; width:100px; } #mq2 { text-align:right; border:solid 1px green; width:100px; } </style> </head> <body> <!-- Scrolling Text --> <div id=ticker></div> <script> var tWidth='100%';                var tHeight='40px';                  var tcolour='#0033FF';              var moStop=true;                  var fontfamily = 'Microsoft Sans Serif'; var tSpeed=4;        var content="testing scrolling text,,...";       var cps=tSpeed; var fsz = parseInt(tHeight) - 4; var mq1,mq2; function startticker() { if (document.getElementById) { var tick = '<div style="position:relative;width:'+tWidth+';height:'+tHeight+';overflow:hidden;background-color:'+tcolour+'"'; if (moStop) tick += ' onmouseover="cps=0" onmouseout="cps=tSpeed"'; tick +='><div id="mq1" style="position:absolute;left:0px;top:0px;font-family:'+fontfamily+';color:#FF9933;font-size:30px;white-space:nowrap;"><\/div>'; tick +='<div id="mq2" style="position:relative;font-family:'+fontfamily+';color:#FF9933;font-size:30px;white-space:nowrap;"><\/div><\/div>'; document.getElementById('ticker').innerHTML = tick; mq1 = document.getElementById("mq1"); mq1.style.left=(parseInt(tWidth)+10)+"px"; mq1.innerHTML='<span id="tx1">'+content+'<\/span>'; mq2 = document.getElementById("mq2"); mq2.innerHTML='<span id="tx2">'+content+'<\/span>'; var leftpos=window.screen.width-40; mq2.style.left=leftpos+"px"; lefttime=setInterval("scrollticker()",50); } } var reset_var1=""; var reset_var2=""; function scrollticker() { mq1.style.left = parseInt(mq1.style.left)-cps+"px"; if (parseInt(mq1.style.left)-cps==0 || parseInt(mq1.style.left)-cps<0) { mq2.style.left = parseInt(mq2.style.left)-cps+"px"; if (reset_var2=="done"); else { var leftpos=window.screen.width-40; mq2.style.left=leftpos+"px"; reset_var2="done"; reset_var1=""; } } if (parseInt(mq2.style.left)-cps==0 || parseInt(mq2.style.left)-cps<0) { if (reset_var1=="done"); else { var leftpos=window.screen.width-40; mq1.style.left=leftpos+"px"; reset_var1="done"; reset_var2=""; } mq2.style.left = parseInt(mq2.style.left)-cps+"px"; } document.getElementById('debug').value="left pos for mq1 is: "+mq1.style.left+" & left pos for mq2 is: "+parseInt(mq2.style.left)+" & window width is: "+window.screen.width; } window.onload=startticker; </script> <textarea id="debug" cols=100 rows=5></textarea> <script> document.getElementById('debug').value=""; </script> </body> </html> [/code] I've added some borders to the scroll text to dissociate the 2 scrollings, & a debug textarea to catch the events, Hoping it helps,, l8tr,,
  7. Hi,, my mind is that you should better use the 'id' method, instead of the 'name' method. ie: document.getElementById('description').value If I get your idea, you could then try something like: <div [b]id[/b]="description" style="display:none">Testing</div> & to make the div/element visible: document.getElementById('description').innerHTML="new contents"; document.getElementById('description').display='block'; you should get less errors, & the method is working with most~all of modern browsers, Hoping it helps,, l8tr,
  8. Hi there,, Using js, the plan could be: onmouse events -> document.getElementById('the_img_id').src="image01.gif" < to change an image, .....//..........//... -> document.getElementById('the_txt_id').innerHTML="new text" < could be to change a text, Trying to help, without too much code,... l8tr,,
  9. Hi, Okey,, I've done many attempts just using CSS with relative/absolute/fixed attributes, and using % or px as unit,... & get still quite disapointed about the layout results on very high & very low screen resolutions. So, I've made few changes,, The mainpage checks now if javascript is enabled or not, and if not, the layout is made with CSS and the navigation is then made with iframes. If js is enabled, then it loads the 'normal page', using js to resize/position elements. Not sure if it is the best, but,... that's the idea for the moment,,... Thanks for any comments/tips in advance, l8tr,,
  10. Hi,, Yesideez,, nogray,, Thanks for the tips & the infos,,... I will check that & do some more tests,, l8tr,,
  11. yes,... maybe,... I will check that, doing some more test, just using CSS with relative position, l8tr,,
  12. Ober,, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]You do know that you can adjust your site for whatever resolution using CSS, right? That's why you have relative positioning and percentages instead of fixed values.[/quote] Yes, I do know that,... but results was not the one expected using very high & very low screen resolutions. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]your site is completely unusable[/quote] true,... & I've read somewhere that about 10% of clients are disabling javascript,... Listening all of your comments, I think now it wasn't a good idea,... so, I should change that in few days, changing also the navigation (which is also in js),... Thanks again to all,, l8tr,,
  13. Hi, For those who have tried the < blink > tags using that lovely IE without success, maybe this kind of function could help some, [code]function BlinkText(node) { var interval=400; // set the interval for the blink var times_to_blink=4; // set the times to blink for (i=0;i<times_to_blink;i++)     {     eval("setTimeout(\"document.getElementById('"+node+"').style.display='none';\","+interval+")");     interval=interval+400;     eval("setTimeout(\"document.getElementById('"+node+"').style.display='block';\","+interval+")");     interval=interval+400;     } }[/code] then, call the function like: [code]<div id="text_to_blink">am I blinking ?</div> <script> BlinkText('text_to_blink'); </script>[/code] to test: [a href=\"http://bdmusique.free.fr/patoche/\" target=\"_blank\"]blinking text with IE[/a] l8tr,, ps: It's not me on the picture,... just someone who want to be famous,... :))
  14. moberemk,, I understand what you mean,, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]one is for style, the other is to help power the style. It is way easier to develop and rebuild a CSS layout then it is a Javascript layout[/quote] yes, you're right,... & sure,, CSS layout is easier to script then javascript layout,... but the position/size is more *precise* (am I speaking english?) using javascript,... my mind,, I won't script that everydays, because it was quite difficult to have this result,... but I like the render, & the layout is respected, depending on the screen resolution, (again, none horizontal bar, fonts readable, etc...) akitchin, hmm, a LOT of lines,... & as you can see the source, a much more then 400,,,,, :p the script is mostly important because of the layout position & resizing part, the code before the changes was about 30kb,.. & it's now 80kb,... :s but as I said,, > I must again optimised the code,, < I need to do some specific functions for that part. I don't know if I will keep that like it is,,... I must think again about it, Thanks for your feedbacks, suggestions & comments,, (& sorry for my bad english) l8tr,,
  15. Hi,, moberemk, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]terrible idea to use Javascript for something like that[/quote] hmm,, yes,... I'm testing/using js for the page layout,... & why not ? :) It seems it does work,... & better then using CSS with '%', believe me,... test the site for check it,, & resize your screen resolution,, result: no horizontal bars, fonts readables as the layout is mostly respected,... tested in 800x600 up to 1600x1024 px,... [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]It seems almost abusive and insulting to the language[/quote] erf,... sounds like I'm hearing my old & *lovely* grand ma'... "don't melt the salt with the sugar in cook !" Look the "Ajax language", as example,... it's made of mostly old languages,... salt, sugar, & a few of pepper,... but mixed together, we get the fabulous Ajax system,, I don't think I'm insulting the javascript language doing such a script,... I'm not telling you that I'm the new gbSAjax 3.7 builder too,... lol Just testing some things,... maybe new for you (as it is for me),... but testing,... and it seems works quite fine,,... l8tr,,
  16. Hi,, steviewdr,, happy to hear this is now faster,, :) thanks for the feedback,, ;) for the elements resizing, just resize your screen resolution,... the CSS is not made using %,... the page display is made with javascript, which calculate the position, the width, the fonts, depending of the screen resolution, text descriptions & photos should be updated soon, will see that with the owners,,... & I must again optimised the code,, If some get more comments/tips,,... but I think the 1st step-test is over for now, l8tr,,
  17. Hi,, steviewdr,, few changes made: re-optimised gifs & jpg images, no-more graphic navigation buttons, legends are now in text, etc,, Thanks for your idea about the gd lib,... it worked fine for the main 'logo',,, :) But I haven't done it for the navigation buttons, because I guess the client will take the same time to download the images created from the server,... hmm,... the script part is now quite 'special',... lol javascript resizes the elements, images & the font-size 'on the fly',... to test, try the site, and change your screen resolution (pray for your pc doesn't crash,... ;p ) I've changed that, because the rendering was not really nice under very high or very low screen resolutions, using classical % method for the CSS definitions,, But the script is now more heavy,... don't know if it is a cool idea,, Thanks for any comments & tips,, l8tr,,
  18. erffff,,, so easier to code,,,,,, ;p I didn't know that one,,... thanks for the tips,, :)
  19. Hi there, Hmm,... I'm not sure to get it well,, so please explain it again,, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]automatically clicks the submit button on another page[/quote] << does that mean that: - the other page is on the same website ? (I guess yes) - in the same website, but the submit button is in a opened window, and in a different window from the main window site ? - the submit button is in an other frame ? Trying to help,, l8tr,,
  20. Hi there,, Hmm,... I think I've found a start to solve your problem,... not sure if it would be good enough for you,, So,... the idea is to change the class value, using javascript,, Under Firefox, no problem,,... using 'setAttribute' method, the changes take effect, & all is running fine,, problem comes with IE (brrrr, as >TOO much< often...................) as test, on a simple: [code]alert(document.getElementById('test').getAttribute("class"));[/code] it reports 'null',.... as it works fine with FF,... Try this code: [code] <html> <style> body { background-color:white; } .classA { font-weight:bold; color:blue; } .classB  { font-weight:normal; color:black; } </style> <body> <input type="button" id="button1" value="click me!" onclick="DochangeClass()"> <div id="test" class="classA">Yes,, I'm a span test,,;)</div> <script> // detecting browser, & mostly IE,, var Brows = new Array(); Brows['user']=""; function Browser() {   var ua, s, i;   this.isIE    = false;   this.version = null;   ua = navigator.userAgent;   s = "MSIE";   if ((i = ua.indexOf(s)) >= 0) {     this.isIE = true;     this.version = parseFloat(ua.substr(i + s.length));     Brows['user']="IE";     return;   } } var browser = new Browser(); function DochangeClass() { if (Brows['user']=="IE")     { alert(document.getElementById('test').getAttribute("class")); //brrrrr,, that one doesn't seem to work with IE,...     var func="function anonymous() {classB}";     eval("document.getElementById('test').setAttribute(\"class\","+func+")"); alert(document.getElementById('test').getAttribute("class")); //brrrrr,,,, still unlucky,... //Hmm,.... so, we have to use that one to change the class:     document.getElementById('test').innerHTML="<span class='classB'>I'm a span test,,</span>";     document.getElementById('button1').value="WoW,, something has changed! :)";     } else     { //works fine with Firefox: //alert(document.getElementById('test').getAttribute("class"));     document.getElementById('test').setAttribute("class","classB") //alert(document.getElementById('test').getAttribute("class"));     document.getElementById('button1').value="WoW,, something has changed! :)";     } } </script> </body> </html> [/code] So, with IE, you will have to change the innerHTML value from the wanted element, to change the class value,, If some know some better way to do this, we would be glad to learn,,... :) Hoping it helps,, l8tr,, [edit] & try that one to play between the classA & the classB,, [code] <html> <style> body { background-color:white; } .classA { font-weight:bold; color:blue; } .classB  { font-weight:normal; color:black; } </style> <body> <input type="button" id="button1" value="click me!" onclick="DochangeClass()"> <div id="test" class="classA">Yes, I'm a span test,, :)</div> <script> // detecting browser, & mostly IE,, var Brows = new Array(); Brows['user']=""; function Browser() {   var ua, s, i;   this.isIE    = false;   this.version = null;   ua = navigator.userAgent;   s = "MSIE";   if ((i = ua.indexOf(s)) >= 0) {     this.isIE = true;     this.version = parseFloat(ua.substr(i + s.length));     Brows['user']="IE";     return;   } } var browser = new Browser(); function DochangeClass() { if (Brows['user']=="IE")     { //alert(document.getElementById('test').getAttribute("class")); //brrrrr,, that one doesn't work with IE,...     var func="function anonymous() {classB}";     eval("document.getElementById('test').setAttribute(\"class\","+func+")"); //alert(document.getElementById('test').getAttribute("class")); //Hmm,.... so, we have to use that one to change the class:     document.getElementById('test').innerHTML="<span class='classB'>I'm a span test,,</span>";     document.getElementById('button1').value="WoW,, something has changed! :)";     var func="function anonymous() {BackToFirstClass()}";     eval("document.getElementById('button1').setAttribute(\"onclick\","+func+")");     } else     { //works with Firefox: //alert(document.getElementById('test').getAttribute("class"));     document.getElementById('test').setAttribute("class","classB") //alert(document.getElementById('test').getAttribute("class"));     document.getElementById('button1').value="WoW,, something has changed! :)";     document.getElementById('button1').setAttribute("onclick","BackToFirstClass()")     } } function BackToFirstClass() { if (Brows['user']=="IE")     {     document.getElementById('test').innerHTML="<span class='classA'>I'm a span test,,</span>";     var func="function anonymous() {DochangeClass()}";     eval("document.getElementById('button1').setAttribute(\"onclick\","+func+")");     } else     {     document.getElementById('test').setAttribute("class","classA")     document.getElementById('button1').setAttribute("onclick","DochangeClass()")     }     document.getElementById('button1').value="hmm, I'm really sure now,... I'm really a test span for lifetime!"; } </script> </body> </html> [/code]
  21. steviewdr,, Thanks for the comment & the tips,,... & your link seems a nice one to get tips about site optimization,, ;) okey, I've now removed the preloader part for the moment ~ which was preloading about 70 images (~700ko),... which is certainly a BIG too much,,... lloll....... I guess I must reconsider my preload system,... true,, I could change the buttons to CSS,,... but I'm afraid I couldn't get the same nice font rendering,,... I will think about it,... The host company used is free, & maybe I should change it,... but as it is just for a personnal website,... don't know if it's really interesting to change the host,... I will see that with the property's owner,, jcombs_31,, maybe test it again, if you have some time... just because I've removed the preloading part,... btw, what is your connection type,, ? Thanks to all, l8tr,,
  22. Hi,, AndyB, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]There's got to be something wrong at the server end, because the content sure isn't THAT big.[/quote] well,... the content is quite big,,... about 1Mb for the images preloaded, and about 35ko for the script part,,... is it too much ? :s & yep,, I will check the layout,,... tested in a big resolution & a big monitor there,, Ober,, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]I don't see an explanation of what it is anywhere[/quote] well, there are some few explanations,... I think you didn't catch them,, to explain more, it's a domain/property to sell [not mine,, ;) ] & the domain description is done, with the houses, lands, etc... also, the numbers on the pictures-map represents the houses (house n°1, n°2,...) hmm,... your opinion about the borders,... is your,... I will let them for the moment,, :] I've already optimized the pics (jpgs converted in gifs, taken less size),,... but it doesn't seem enough according to both of you,, :s I'm sure I must optimize the load time,... don't know yet how would be the best way,... To add,, this is a 'personal website', and it will be linked by some professionals imobilier websites, for some potential "buyers",, who know what they're searching for,... Many thanks for both of your comments,,... fully appreciated,, ;) l8tr,,
  23. Hi there,, just a little idea,, In your script, the response you get,,... does it look like: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]currentNode.innerHTML = some text;[/quote] or like: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]currentNode.innerHTML = [b]"[/b]some text[b]"[/b];[/quote] you know,, missing comas could make an error,...
  24. Hi to all,, Just to have few advices,, if you could have a quick look on this: [a href=\"http://bdmusique.free.fr/ocher/\" target=\"_blank\"]current work,,[/a] I'd like you to say if you think the loading is fast enough for you, (not optimized yet for 56k modems), what you think about the design (quite simple, but suffisant ?), & also your comment about the navigation,... I know, the site is not yet in english,... I will see that soon,, ;) Thanks in advance,, l8tr,
  25. Yep,,, I guess it could be done too in php+javascript,... I will keep you inform of the result,,... work in progress,,, 0% -----------> 10% Thanks again for your comments,, :) l8tr,,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.