Jump to content

Search the Community

Showing results for tags 'SOLVED'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 18 results

  1. My router provided by my ISP is not compatible with NAT loopback. I cannot access my self-hosted site from within my own home network. I can access my website from a proxy or from outside the network, but not on my own wifi. There are dozens of Google results for NAT loopback (I've seen them all), so I won't elaborate further on what it is. My question is how do I solve this problem? I want to somehow configure a raspberry pi to serve as a DNS server, but how would I do this? I know I cam not the only one with this problem because I've seen countless other posts in numerous other forums about this matter, and no solution has worked yet.
  2. Hi all, This is my test.php: <?phpinclude($_SERVER["DOCUMENT_ROOT"]."/config.php"); //Include de config met username en passwords$hostname = 'localhost';$username = $GLOBALS["dbuser"];$password = $GLOBALS["dbpass"];$dbname = $GLOBALS["dbname"];try{$conn = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password);$sql = "SELECT * FROM " . $GLOBALS["adres"];foreach ($conn->query($sql) as $row){$name = $row['naam'];$street = $row['straat'];}/*** close the database connection ***/$dbh = null;}catch(PDOException $e){echo $e->getMessage();}echo $name;?><table id="table1"><tr><td><font>Name</font></td><td class='tableBracket'>:</td><td><input type='text' value='<?php echo $name;?>'/></td></tr></table> When $row['name'] in database is test's, then I got this: test's Name :test (in textbox) When $row['name'] in database is test"s, then I got this: test"s Name :test"s (in textbox) So the issue is with the ' or " stored in database. I know I has to be with this line value='<?php echo $name;?>' browser wil read is like: value=' test' Replacing the single quote's after value= to double quotes hels, but then it would fail when double quotes are in database. What would you suggestions be? Store it in database like this: test's instead of test's?
  3. My website needs to be filled till bottom of screen, even when there is only one line of text. In all browser top of my page looks good: - companyname; - navigation - content If content is a little text, for example just one line, then I want background color of content div be till bottom of page, so this div needs to be filled all the way down to bottom. With the code I provide here, I accomplish this in Chrome and Opera, but in IE and Firefox the collored content div is only filled till there is no more content, so when just a little content, the page is white all the wat down till bottom of screen... hope you can help me out? This is the index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>TEST</title> <meta http-equiv="X-UA-Compatible" content="IE=8"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta http-equiv="Content-Language" content="nl"/> <meta name="robots" content="index,follow"/><meta name="description" content="<?php echo $rowSEO['meta_description'];?>"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> <link rel="stylesheet" type="text/css" href="/css/test.css"> <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script></head><body><div id='container'><div id='wrapper'><div id='header'><div id='nav'><div id='nav_button' class='magenta' onclick="location.href='/index.php';"><p class='navFont'>Home</p></div><div id='nav_button' class='lightblue' onclick="location.href='/openingstijden.php';"><p class='navFont'>Openingstijden</p></div><div id='nav_button' class='yellow' onclick="location.href='/ervaringen.php';"><p class='navFont'>Ervaringen - Diploma's</p></div><div id='nav_button' class='green' onclick="location.href='/fotos.php';"><p class='navFont'>Foto's</p></div><div id='nav_button' class='orange' onclick="location.href='/gastenboek.php';"><p class='navFont'>Gastenboek</p></div><div id='nav_button' class='darkblue' onclick="location.href='/contact.php';"><p class='navFont'>Contact</p></div></div></div><div id='content_container1' class='border border1'><div class="container_content"><p>test</p></div></div></div></div></body></html> This is the css file: * {margin:0;padding:0;}html, body{height:100%;}#container{width:100%;top:0;bottom:0;display:block;position:absolute;background:#DEF0FA;}#wrapper{width:100%;height:100%;display:table; margin:0 auto;overflow:hidden;z-index:2;}#header{height:200px;width:100%;background:#DEF0FA;overflow:hidden;position:relative;}#nav{padding-left:0;padding-right:0;height:20%;width:100%;bottom:0px;position:absolute;}#nav_button{width:16.666%;height:100%;float:left;text-align:center;vertical-align:middle;font-weight:bold;cursor:pointer;display:table;border-top:3px solid #26B249;}#nav_button.magenta{background:magenta;/*border-left:5px solid #643609;*/}#nav_button.lightblue{background:cyan;}#nav_button.yellow{background:yellow;}#nav_button.green{background:green;}#nav_button.orange{background:orange;}#nav_button.darkblue{background:blue;}.container_content{position:relative;width:100%;height:calc(100% - 200px);height:-webkit-calc(100% - 200px);height:-moz-calc(100% - 200px);}#content_container1{height:80%;/*fall back if needed*/height:calc(100% + 200px);height:-moz-calc(100% + 200px);height:-webkit-calc(100% + 200px);overflow:hidden;}#content_container1{background:#E68FE6;}
  4. Bogey

    Mysql issue

    Hi all, Don't know to ask it here or in the SQL section, I assumed here, cause it is about Mysql instead of SQL. 1.) On page I have an textarea, where user fills in text; 2.) Then a js function sends this value to a php page; 3.) This PHP page, stores value in Mysql database. When for example I fill in this -> hello world then everything goes well. When for example I fill in this -> hello world's then nothing is stored in database. I has to do something with the single quote, but can't get it managed... Under here I post some code: 1.) <a href="javascript:void(0)" class='changeSaveLink' id='changeAlbum' onclick="changeTekst('change','textarea','1','50','50','iconIDalbum','changeAlbum','albumNaam','','albumnaam','<?php echo $GLOBALS["db_albums"];?>','50',<?php echo $albumID;?>)" title='Albumnaam aanpassen'></a> 2.) function changeTekst(saveORchange,inputKind,rows,cols,maxLength,iconID,ahrefID,inputDivID,inputID,columnName,dbTable,maxChars,albumID){var inputIDvalue="";if (inputID){var inputIDvalue = document.getElementById(inputID).value.replace(/n/g,'<br />');}if (saveORchange=='change'){var saveChange = 'saveAlbum';}if (saveORchange=='save'){var saveChange = 'changeAlbum';}document.getElementById(iconID).className=saveChange; run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(iconID).innerHTML=xmlhttp.responseText;run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(inputDivID).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', '/cms/modules/changeTekst.php?a=' + saveORchange +'&b=' + inputID +'&c=' + inputIDvalue +'&d=' + columnName +'&e=' + inputKind +'&f=' + rows +'&g=' + cols +'&h=' + maxLength +'&i=' + maxChars +'&j=' + dbTable +'&id=' + albumID, true);xmlhttp.send(); }}xmlhttp.open('GET', '/cms/modules/changeIcon.php?a=' + iconID +'&b=' + saveORchange +'&c=' + ahrefID +'&d=' + inputDivID +'&e=' + columnName +'&f=' + dbTable +'&g=tekst' +'&h=' + rows +'&i=' + cols +'&j=' + maxLength +'&k=' + maxChars +'&l=empty' +'&id=' + albumID, true);xmlhttp.send();} 3.) <?phpfunction br2nl( $input ) {return preg_replace('/<br(s+)?/?>/i', "n", $input);} $saveORchange = stripslashes($_GET['a']);$inputID = stripslashes($_GET['b']);$inputIDvalue = stripslashes($_GET['c']);$inputIDvalueDB = utf8_decode($inputIDvalue);//$inputIDvalueDB = utf8_decode(addslashes($inputIDvalue));$columnName = stripslashes($_GET['d']);$inputKind = stripslashes($_GET['e']);$rows = stripslashes($_GET['f']);$cols = stripslashes($_GET['g']);$maxLength = stripslashes($_GET['h']);$maxCars = stripslashes($_GET['i']);$tableName = stripslashes($_GET['j']);$albumID = stripslashes($_GET['id']); include($_SERVER["DOCUMENT_ROOT"]."/config.php"); //Include de config met username en passwordsmysql_connect("localhost",$GLOBALS["dbuser"],$GLOBALS["dbpass"]) or die(mysql_error());mysql_select_db($GLOBALS["dbname"]);$resultQuery = mysql_query("SELECT * FROM " . $tableName . " WHERE id='$albumID'");$rowQuery = mysql_fetch_array($resultQuery);if ($saveORchange=='change'){if ($inputKind=='textarea'){?><textarea id='areaHomeTekst' maxlength='<?php echo $maxLength;?>' rows='<?php echo $rows;?>' cols='<?php echo $cols;?>' value='' onfocus="setbg('areaHomeTekst','#BD5C5C');" onblur="setbg('areaHomeTekst','white')"><?php echo br2nl(utf8_encode($rowQuery[$columnName]));?></textarea><br /><font class='sublabel'>maximaal <?php echo $maxCars;?> tekens!</font><?php}}if ($saveORchange=='save'){ mysql_query("UPDATE " . $tableName . " SET$columnName = '$inputIDvalueDB'WHERE id = '$albumID'");$resultQuery = mysql_query("SELECT * FROM " . $tableName . " WHERE id='$albumID'");$rowQuery = mysql_fetch_array($resultQuery);echo utf8_encode($rowQuery[$columnName]);}?> So how can I make it managed, that also the ' (or ") is send to DB... I also tried to change those chars to numeric html code, but still can't get what I want...
  5. Hi all, Users can upload their own photoalbums on my website, but I want them to be able to rotate the photo's: I have this code, the code rotates the photo (in browser is show rotated) but picture itself on server isn't changed, so when viewing picture, it still not rotated... what's wrong with code underneath? How can I save the rotated picture over the existing picture? <?php$fotoID = stripslashes($_GET['a']);$tableName = stripslashes($_GET['b']); include($_SERVER["DOCUMENT_ROOT"]."/config.php"); //Include de config met username en passwordsmysql_connect("localhost",$GLOBALS["dbuser"],$GLOBALS["dbpass"]) or die(mysql_error());mysql_select_db($GLOBALS["dbname"]); $resultFotos = mysql_query("SELECT * FROM " . $tableName . " WHERE id='$fotoID'");$rowFotos = mysql_fetch_array($resultFotos);$bestandsnaam = $rowFotos['bestandsnaam'];$albumID = $rowFotos['album_id']; // File and rotation$fotoFile = $_SERVER["DOCUMENT_ROOT"]. "/images/fotoalbums/id" . $albumID . "/" . $bestandsnaam . ".jpg";$thumbsFile = $_SERVER["DOCUMENT_ROOT"]. "/images/fotoalbums/id" . $albumID . "/thumbs/" . $bestandsnaam . "_thumb.jpg";$degrees = 90; // Content typeheader('Content-type: image/jpeg'); // Load$sourceFoto = imagecreatefromjpeg($fotoFile) or die('Error opening file '.$fotoFile);$sourceThumb = imagecreatefromjpeg($thumbsFile)or die('Error opening file '.$thumbsFile); // Rotate$rotateFoto = imagerotate($sourceFoto, $degrees, 0);$rotateThumb = imagerotate($sourceThumb, $degrees, 0); // Outputimagejpeg($rotateFoto);imagejpeg($rotateThumb); // Free the memoryimagedestroy($sourceFoto);imagedestroy($sourceThumb);imagedestroy($rotateFoto);imagedestroy($rotateThumb);?>
  6. Hi all, Main page (tester.php) is this: <!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>TEST</title> <?php include ($_SERVER["DOCUMENT_ROOT"]."/0_head.php"); ?> </head> <body> <div class="entry" id="form_rebo"> <form id='form_verkoperAanmeld' method='GET'> <fieldset> <button tabindex='15' class='button radius right' id='buttonSend' onclick="aanmeldenTester('form_rebo')">TEST</button> </fieldset> </form> </div> </body></html> js-files is this: function aanmeldenTester(targetDiv){ alert ("aanmeldenTester"); document.getElementById('buttonSend').disabled = true; run_xmlhttp(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(targetDiv).innerHTML=xmlhttp.responseText; } } xmlhttp.open('GET', '/unsecure/aanmelden/db_addTempUserTEST.php', true); xmlhttp.send();} db_addTempUserTEST.php files is this: <?phpecho "testTESTtest";?> conclusions: IE and Chrome gives me this: - the alert box with message "aanmeldenTester" - an empty page (tester.php) with: "testTESTtest" FireFox gives me this: - the alert box with message "aanmeldenTester" - a page (teste.php) with the TEST-button So how comes FF still gives me the TEST-button and IE and Chrome gives me the "testTESTtest"... What IE and Chrome do I want, what FF does is not what I want... Any clues?
  7. I have a mysqldb with this in a cell <p>test's test.</p> The coalition is: utf8_general_ci This code in my page runs fine: <?php echo utf8_encode($rowMerken['omschrijving_test']);?> it echo's his: test's test. But when I get the info with javascript from the DB I got an error. This is the js-file: function Test(targetID2,omschrijving){//var textOmschrijving = omschrijving.replace(/n/g,'<br />');//document.getElementById(targetID2).innerHTML = utf8_encode(omschrijving);//textOmschrijving = utf8_encode(omschrijving)document.getElementById(targetID2).innerHTML = omschrijving;} The error occures is: Uncaught SyntaxError: Unexpected identifier any help?
  8. Hi all, This is the code: <form action="/login.php" method="post"><p><input type="text" class="" name="username" placeholder="Email" /><input type="password" class="" name="password" placeholder="Password" /><input type="submit" class="button_login" name="btn_login" id="btn_login" value=""/></p></form> Chrome works fine! But IE: When pushing ENTER in IE after filled in the PASSWORD, then form doesn't submit. Searching made me find out its because there is only one textbox in form. More than one textbox should go further. But I want only ONE textbox. I did try it with a hidden textbox, but couldn't make it happen. Any ideas?
  9. Hi all, This is the line in the HTML-file: <a href="javascript:void(0)" onclick="showConfirm('delete','<?php echo $rowOpdrachten['id'];?>')" class='button radius'>DELETE</a> This is my javascript function: var winConfirm = null;function showConfirm(kind,opdrachtID){var windowWidth = 250;var windowHeight = 100;var locX = ( screen.width - windowWidth ) / 2;var locY = ( screen.height - windowHeight ) / 2;var windowFeatures = "width=" + windowWidth + ",height=" + windowHeight +",screenX=" + locX + ",screenY=" + locY + ",left=" + locX + ",top=" + locY;if ( ( winConfirm != null ) && !winConfirm.closed ){winConfirm.close();}winConfirm = open( "", "winConfirm", windowFeatures );if (kind=='delete'){var theHTML = '<HEAD><TITLE></TITLE></HEAD>'+ '<BODY BGCOLOR="#CCE0F5">'+ '<CENTER><B>'+ 'Are you sure you want to delete item?'+ '</B><FORM NAME="buttonForm">'+ '<INPUT TYPE="button" VALUE="YES"'+ ' ONCLICK="opener.buttonClicked(0,'+opdrachtID+');self.close();"/>'+ ' '+ '<INPUT TYPE="button" VALUE="NO"'+ ' ONCLICK="opener.buttonClicked(1,'+opdrachtID+');self.close();"/>'+ '</FORM></BODY>';winConfirm.document.writeln( theHTML );}if (kind=='sold'){var theHTML = '<HEAD><TITLE></TITLE></HEAD>'+ '<BODY BGCOLOR="#CCE0F5">'+ '<CENTER><B>'+ 'Is it sold?'+ '</B><FORM NAME="buttonForm">'+ '<INPUT TYPE="button" VALUE="SOLD"'+ ' ONCLICK="opener.buttonClickedVerkocht(0,'+opdrachtID+');self.close();"/>'+ ' '+ '<INPUT TYPE="button" VALUE="NOT_SOLD"'+ ' ONCLICK="opener.buttonClickedVerkocht(1,'+opdrachtID+');self.close();"/>'+ '</FORM></BODY>';winConfirm.document.writeln( theHTML );}function buttonClicked(buttonChoice,opdrachtID){switch( buttonChoice ){case 0:showConfirm('sold',opdrachtID);break;case 1:alert ("Not deleted!");break;default:document.myForm.showResult.value = "(void)";break;}}function buttonClickedVerkocht(buttonChoice,opdrachtID){switch( buttonChoice ){case 0:window.location = "/test.php?a=yes&b=" + opdrachtID;break;case 1:window.location = "/test.php?a=no&b=" + opdrachtID;break;default:document.myForm.showResult.value = "(void)";break;}}} It works fine in Chrome!!! But in IE it does not work like it should... The first window appears. When clicked "NO" then the alert shows up, but it stays behind the first window, instead of in front of it. When clicked "YES" then the first window closes, but the second window doesn't show up. So when clicked "NO", then the alert has to show up in front of the first window. When clicked "YES" the second window has to show up. Any suggestions?
  10. Hi all, I am writing some code. It works in Chrome, but not in IE. I have a variable options which contains the options of a select. This code works okay in Chrome: document.getElementById(selectBox2).innerHTML = options; But in IE the select is not filled. I read numerous articles, but can't get it right... this is what I have, but does not work. var newdiv = document.createElement("div");newdiv.innerHTML = options;alert (newdiv.innerHTML);var container = document.getElementById(selectBox2);container.appendChild(newdiv); The alert, does give the right values, but I can't get them in the select. Any suggestions?
  11. SOLVED (Thanks to JamesB) Hey all, I use Google Maps to allow people to navigate to our shop.the problem is that my route description always disappears under my footer.When I resize my browser directions get fully displayedso the problem is in my maxheight.js So i search a way that when calcRoute() is launched my maxheight resize without the need of resize my browers. Google JS code: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var directionDisplay; var directionsService = new google.maps.DirectionsService(); function initialize() { var latlng = new google.maps.LatLng(51.100899,4.415780); directionsDisplay = new google.maps.DirectionsRenderer(); var myOptions = { zoom: 17, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false }; var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById("directionsPanel")); var image = '../images/contact/mapsicon.png'; var marker = new google.maps.Marker({ position: latlng, title: 'Rijwielen De Zwaluw NV', map: map, icon: image }); } function calcRoute() { var start = document.getElementById("routeStart").value; var end = "51.100899,4.415780"; var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } else { if (status == 'ZERO_RESULTS') { alert('No route could be found between the origin and destination.'); } else if (status == 'UNKNOWN_ERROR') { alert('A directions request could not be processed due to a server error. The request may succeed if you try again.'); } else if (status == 'REQUEST_DENIED') { alert('This webpage is not allowed to use the directions service.'); } else if (status == 'OVER_QUERY_LIMIT') { alert('The webpage has gone over the requests limit in too short a period of time.'); } else if (status == 'NOT_FOUND') { alert('At least one of the origin, destination, or waypoints could not be geocoded.'); } else if (status == 'INVALID_REQUEST') { alert('The DirectionsRequest provided was invalid.'); } else { alert("There was an unknown error in your request. Requeststatus: nn"+status); } } }); } </script>
  12. 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?
  13. 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);
  14. Hi all,I have a textarea, which is pre filled out of a database.When I click inside the textarea, to add text, then the area is cleared, instead of keeping the prefilled stuff alive...When I don't type something, and just click outside the area, then the prefilled info returns.When I do type letter, and click outside the area, then only the new letters stays show.When I delete the previous single letter and click outside, then the prefilled stuff is put back again...I want when clicking the area, that the prefilled text stays shown and is adjustable...hope you understand what I mean...BTW the textarea is prefilled from database using PHP...
  15. 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(); });
  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. Hi all, This line of code is not working: document.getElementById(divID).onclick="test()"; What I am trying to do is, when a JSfunction is called, this function adds a event to a particular DIV I tried it on different manners f.e. I replaced the test() for the function itself, instead of calling it... This on the other had DOES work! document.getElementById(targetIDreact).title="testing"; document.getElementById(targetIDreact).style.cursor="pointer";document.getElementById(targetIDreact).className="DbContentContainer"; Any help?
  18. Bogey

    Use php inside divID

    Hi all, Is something like this possible? $a=1;while (blablabla)){<DIV id='idname_<?php echo $a;?>'></DIV>$a++;} This is what I want, but cant get it done :S
×
×
  • Create New...