Jump to content

Bogey

Members
  • Posts

    265
  • Joined

  • Last visited

Everything posted by Bogey

  1. YESSSS!!! thank you, thank you, thank you...!!! This took me some evenings of headache... thnx again
  2. Isn't newID local? It is inside function Add, so it is local I thought...?
  3. Hi all, This is my stripped javascriptcode: function Add(targetIDappliedOld,targetIDreact){var newDate = new Date;element=document.getElementById(targetIDreact);element.innerHTML=document.getElementById(targetIDappliedOld).innerHTML;element.className="DbContentContainer";newID = 'DbContentContainer' + newDate.getTime();//getTime added to get a unique idelement.onclick = function(){Remove(newID)};element.id=newID;}function Remove(testID){alert(testID);} When I add the first one, and click the added div, then I get the right alert. When I add more, then I get on all clickable div's the alert of the last id, instead of the id of the clicked div. Hope it is clear with this piece of code?
  4. Yes that did it. Got it working! thnx!!!
  5. Thanks for the quick response... I am going to try it out today... I let you know if I got it working!
  6. html: <div class='testClass' id='testID' onclick="addToList('<?php echo $ID_1;?>','<?php echo $ID_2;?>')"></div> Javascript: function addToList(newID,oldID){alert("ok_1");document.getElementById(newID).innerHTML=document.getElementById(oldID).innerHTML;document.getElementById(newID).className="newClass"; document.getElementById(newID).onclick = "removeFromList(newID)";document.getElementById(newID).onclick = removeFromList;document.getElementById(newID).onclick = "removeFromList('" + newID + "')";} function removeFromList(newID){alert ("ok_2");alert (newID);} The first and last onclick adders does not work. The second gives the alert "ok_2". But I want also the alers (newID);
  7. Hi all, I have 3 divs, that has to be aligned next to eachother at bottom of parent div. HTML: <div class='test_foto'><div class='test_buttons1'> </div><div class='test_buttons1'> </div><div class='test_buttons1'> </div></div>
  8. Thnx... I will check that one out
  9. It has been a while, but it is solved.... there was a specific line in a .js file that caused the problem... thnx
  10. Solved!!! Costs me couple of evenings... but a little adjustment in the pk.js file did the trick...
  11. Hi all, I am building a website where users can buy a second hand car. Anyone any idea about which color(combination) is best used? I have googled about this, but still a hard issue. Now I am using: - mostly white - red items (buttons / lines) - black text But I am not sure if this is best? I think blue maybe better than red? Or even use red and blue? I am curious on your reactions
  12. Still haven't it working... but keep on trying... I'll get back to this! thnx in advance...
  13. I change this line: <div id="project_details" class="portfolio_thumbs_gallery" style="display:none;"> but nothing changed... this is the testpage I am talking about: http://www.naks.nl/test.php
  14. Hi all, On my page I have a jscript function to hide a certain project. The #project_details div can be hide when clicking the button (hide). But I want the particular div also hide on page load.... so only showing, when user clicks button to show. The hide button works fine, but the function call after window.onload does not work. I have this code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>TESTPAGE</title> <meta http-equiv="X-UA-Compatible" content="IE=8" /> <meta http-equiv="Content-Type" content="text/html" charset="ISO-8859-1" /> <meta http-equiv="Content-Language" content="nl" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <link rel="stylesheet" type="text/css" media="screen" href="/style.css" /> <link rel="stylesheet" type="text/css" media="screen" href="/css/skin.css" /> <script type="text/javascript" src="/jscript/jquery.js"></script> <script type="text/javascript" src="/jscript/easing.js"></script> <script type="text/javascript" src="/jscript/cufon-yui.js"></script> <script type="text/javascript" src="/jscript/swfobject.js"></script> <script type="text/javascript" src="/jscript/pk.js"></script></head><body id="body"> <div class="wrap_fullwidth" id="top"> <div class="center over_all"> <!--[if !IE]>start project details<![endif]--> <div class="center" id='topContainer'> <div id="project_details" class="portfolio_thumbs_gallery"> <!--[if !IE]>start project 1<![endif]--> <div class="project"> <div class="box_three_fourth"> <p>test1test1test1test1test1test1test1</p> <p>test1test1test1test1test1test1test1</p> <p>test1test1test1test1test1test1test1</p> </div> <div class="box_one_fourth last"> <p class="button_close"><img src="/images/skin/close_icon.png" alt="" title="sluiten" /></p> </div> </div> <!--[if !IE]>end project 1<![endif]--> <!--[if !IE]>start project 1<![endif]--> <div class="project"> <div class="box_three_fourth"> <p>test2test2test2test2test2test2test2</p> <p>test2test2test2test2test2test2test2</p> <p>test2test2test2test2test2test2test2</p> </div> <div class="box_one_fourth last"> <p class="button_close"><img src="/images/skin/close_icon.png" alt="" title="sluiten" /></p> </div> </div> <!--[if !IE]>end project 1<![endif]--> <!--[if !IE]>start project 1<![endif]--> <div class="project"> <div class="box_three_fourth"> <p>test3test3test3test3test3test3test3</p> <p>test3test3test3test3test3test3test3</p> <p>test3test3test3test3test3test3test3</p> </div> <div class="box_one_fourth last"> <p class="button_close"><img src="/images/skin/close_icon.png" alt="" title="sluiten" /></p> </div> </div> <!--[if !IE]>end project 1<![endif]--> </div> </div> <!--[if !IE]>end project details<![endif]--> <!--[if !IE]>start breadcrumb<![endif]--> <div class="center breadcrumb"> <p><a href="/secure/index.php" title="">Home</a> / opdrachten</p> </div> <!--[if !IE]>end breadcrumb<![endif]--> </div> </div> <div class="wrap_fullwidth" id="main"> <div class="center" id="grid"> <div class="box_one_third last"> <p>bla1bla1bla1</p> <div class="small_shadow"> <p class="view"><a href="#" title="" class="light_button">Toon</a></p> </div> </div> <div class="box_one_third last"> <p>bla2bla2bla2</p> <div class="small_shadow"> <p class="view"><a href="#" title="" class="light_button">Toon</a></p> </div> </div> <div class="box_one_third last"> <p>bla3bla3bla3</p> <div class="small_shadow"> <p class="view"><a href="#" title="" class="light_button">Toon</a></p> </div> </div> </div> </div> <button onclick="closeProjects()">hide</button><script>//call after page loadedwindow.onload=closeProjects() ; </script></body></html> This are some snippets code is from pk.js: function closeProjects() { jQuery("#project_details .project").filter(":visible").fadeOut(400); jQuery('#portfolio_navigation').fadeOut(200); jQuery("#project_details").animate({ "height" : "0px" }, 400, "easeInOutQuad"); jQuery('.breadcrumb').animate({"paddingTop": "70px"}, 400, "easeInOutQuad");}/* BUTTON CLOSE */ $(settings.buttonClose, $items).click(function() { closeProjects(); });
  15. When I look at source code of page (after running function changeTime) is only see: <div id='ajustTime'> </div> But page itself looks with a filled div (select added) Hope I made myself clear?
  16. Mainpage snippet: <div id='iconIDma' class='changeContact'><a href="javascript:void(0)" class='changeSaveLink' id='' onclick="changeTime('maandag','iconIDma','ajustTime')" title='tijden van maandag aanpassen'></a></div><div id='ajustTime'> </div> .js file: function changeTime(dag,iconID,targetDIV){run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetDIV).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', 'modules/openingstijden/changeTime.php?a=' + dag + '&b=' + iconID, true);xmlhttp.send();} ChangeTime.php snippet: <table><tr><td><div id='iconTimeSave' class='saveContact'><a href="javascript:void(0)" class='changeSaveLink' id='' onclick="saveTime('<?php echo $dag;?>','<?php echo $dagje?>_RealTimes')" title='nieuwe tijden van <?php echo $dag;?> opslaan'></a></div></td><td><div id='iconTimeCancel' class='cancelContact'><a href="javascript:void(0)" class='changeSaveLink' id='' onclick="cancelTime()" title='annuleren'></a></div></td><td><select id='selectChangeTime' name='selectChangeTime' onchange="ajustTime('<?php echo $dag;?>','changeTime')"><option value='0' >gesloten</option><option value='1' <?php if ($rowTijden[$dag]==1){echo "selected";}?>>1 dagdeel</option><option value='2' <?php if ($rowTijden[$dag]==2){echo "selected";}?>>2 dagdelen</option><option value='3' <?php if ($rowTijden[$dag]==3){echo "selected";}?>>3 dagdelen</option><option value='4' <?php if ($rowTijden[$dag]==4){echo "selected";}?>>op afspraak</option></select></td></table> js file: function saveTime(dag, targetDIV){dagDeel = document.getElementById('selectChangeTime').value;alert (dagDeel);return; run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetDIV).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', 'modules/openingstijden/saveTime.php?a=' + dag, true);xmlhttp.send();} I can't get the value of 'selectChangeTime' (alert (dagDeel), value is null it says... Is it possible to get that value, or not this way, cause of AJAX call?
  17. Thanks!!! I will look for that in documentation... If not, then I go find another plugin
  18. DateTimePicker is a plugin, so users can pick a time to write to database... When I load <form> on startup in the page (so in the code of the page) then everything goes well... But when I have the <form> in another php file, and I load this file inside my main page (AJAXcall) then I don't get it showed how suppose to... 1.) When <form> in page, then it is show like supposed to! (texbox with clock next to it) 2.) When <form> loaded in page, after user picked a <select>, then it is show wrong! (just the textbox, without the clock Hope it makes some sense?
  19. Hi all, This is my main page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><!-- Date Time Picker================================================== --><link rel="stylesheet" href="../plugins/DateTimePicker/images/main.css"><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/prototype-1.js"></script><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/prototype-base-extensions.js"></script><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/prototype-date-extensions.js"></script><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/behaviour.js"></script><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/datepicker.js"></script><link rel="stylesheet" href="../plugins/DateTimePicker/images/datepicker.css"><script type="text/javascript" language="javascript" src="../plugins/DateTimePicker/images/behaviors.js"></script><!--==================================================Date Time Picker --> </head><body><form onsubmit="return false;"><input class="timepicker" /><br clear="all"/><br /></form><div id='divTest'> </div><select id='selectTijden' onchange="testtesttest('divTest')"><option value='0'>gesloten</option><option value='1'>1 dagdeel</option><option value='2'>2 dagdelen</option><option value='3'>3 dagdelen</option><option value='4'>alleen op afspraak</option></select></body></html> This is my js-file: function testtesttest(targetDIV){run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetDIV).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', 'test.php', true);xmlhttp.send();} this is my test.php file: <form onsubmit="return false;"><input class="timepicker" /><br clear="all"/><br /></form> this is how item looks on mainpage: this is how item looks on inserted php part on mainpage: So the mainpage show plugin perfect (with clock).... But when running scriptfile, and load php file inside mainpage, then inserted item misses the clock... Do I reload the needed files again in test.php? I guessed not, cause needed files needed be loaded inside the head...
  20. Hi all, I have a button, which needs to be enabled, after some items has been filled in on the page. At startup is it disabled. In this <a> I have a onclick event, which ONLY must execute, when the <a> has been enabled, but when I use underneath line, than the code even executes when disabled... any sollutions? <a class="button radius" id='ahrefSendContact' href="javascript:void(0)" disabled='disabled' onclick="test('ahrefSendContact')" title='active when all filled in!'>Send</a>
  21. Yes, that was it!!!!But why decode, if page is charset utf8 and database is coalition utf8? thnx again!
  22. I did what you told in the post.... I need Renénormal gives: Réneencoding gives: Réne
  23. Not totally solved :S other problem! I want for example the name "René" written to the mysql database, but I dont get the é there... I get:éé but noté this is in my code: <meta http-equiv="X-UA-Compatible" content="IE=8" /><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><meta http-equiv="Content-Language" content="nl" /> I tried different things: $sender = stripslashes($_GET['a']);} $sender= utf8_encode($sender);$sender= '=?UTF-8?B?' . base64_encode($sender) . '?='; Coallitions tried in mysql:utf8_binutf8_general_cilatin1_general_cilatin1_swedish_ci any sollutions??? And a question for dutch coders here (also for english speaking, but I prefer dutch, cause I think this is a difficult item):Is there a course/book/topic where the uncoding issue is being explained from scratch to advanced....?
  24. thanks all for the enormous help!
×
×
  • Create New...