Jump to content

GBS

Members
  • Posts

    108
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

GBS's Achievements

Member

Member (2/5)

0

Reputation

  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,,
×
×
  • 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.