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

  1. 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?
  2. 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;}
  3. 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...
  4. 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);?>
  5. 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?
  6. 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?
  7. 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?
  8. 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?
  9. 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?
  10. 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>
  11. 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?
  12. 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);
  13. 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...
  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. 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?
  16. 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?
  17. 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
  18. Hey hey, This is going on:1.) a user fills in a form to make an account on my website;2.) temp account is made, and confirmation mail is send to user;3.) user clicks link in confirmation mail, to activate account. This all works PERFECTBUT....!!!! This is a piece of code from them confirmation.php: (calling when activationlink in confirmation mail is clicked) <P align='center'>Bla bla bla is send to <?php echo $row['email'];?> <BR />also check your spam-box, for the mail!<BR /> <BR />click <A href=<?php echo $_SERVER['SERVER_NAME'];?>>here</A> to go back to homepage of website</P> the email adres in showing OK!the link is NOT!!!!Link looks like this: www.mywebsite.nl/modules/moduleX/www.mywebsite.nlinstead of this:www.mywebsite.nl Hope I made myself clear?Anyone knows why/how $_SERVER['SERVER_NAME'] adds the directory of confirmation.php in front of the servername?Or has it something to do with de href part? Thanx in advance
  19. Why doesn't this code work? $number=$row['number'];$number++;die($number); This works!: $number=$row['number'];die($number); The $row['number'] is coming from a database (Type: int(5)) ) So the cell is declared a integer, so I dont get it, why it wont increase in PHP?!?!?! The second code gives a number.... the first code gives NOTHING! Any help?
  20. Hi all, This is my source code: <script type="text/javascript">function fillContent(content, targetDiv){run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetDiv).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', content, true);xmlhttp.send();}</SCRIPT> <DIV class='secure'><DIV class='secure_nav'><A href="http://www.2hak.nl/loginverkoper.html")>Home</A><BR /><A href="javascript:void()" onclick="fillContent('modules/verkoper_secure_gegevens.html','secure_main')">Gegevens_html</A><BR /><A href="javascript:void()" onclick="fillContent('modules/verkoper_secure_gegevens.php','secure_main')">Gegevens_php</A><BR /><A href="javascript:void()" onclick="fillContent('modules/verkoper_secure_database.html','secure_main')">Database</A><BR /></DIV> <DIV class='secure_main' id='secure_main'><?php echo $_SESSION['username']; ?></DIV> </DIV> This is my HTML: <?phpsession_start();?> <div><h1>this is session <?php echo $_SESSION['username']; ?> </h1></div> this is my php: <?phpsession_start();echo "<h1>this is session " . $_SESSION['username'] . "</h1>";?> source-code shows the session-variable 'users!php-page shows the session-variable!html-page DOESN'T show the session-variable! No I am using a php-page for that one (cause this works), but I want to use a HTML page instead (cause 99% of the page is HTML) en only put the little bits of php-code into <?php some code ?> Why doesnt show my HTML-page the value of the variable, and why does PHP-page show it!?!?
  21. Bogey

    $_SESSION issue

    Here I am again!!!! :S myfile.html: <script type="text/javascript">function fillContent(content, targetDiv){run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetDiv).innerHTML=xmlhttp.responseText;}}xmlhttp.open('GET', content, true);xmlhttp.send();}</SCRIPT> <DIV class='secure'><DIV class='secure_nav'><A href="loginverkoper.html">Home</A><BR /><A href="javascript:void(0)" onclick="fillContent('modules/verkoper_secure_gegevens.php','secure_main')">Gegevens</A><BR /><A href="javascript:void()" onclick="fillContent('modules/verkoper_secure_database.html','secure_main')">Database</A><BR /></DIV> <DIV class='secure_main' id='secure_main'><?phpecho $_SESSION["running"];?></DIV></DIV> verkoper_secure_gegevens.php: <?phpecho $_SESSION["running"];?> $_SESSION["running"] is set TRUE somewhere...When loading myfile.html, it echo's 1When pushing 'Gegevens', then $_SESSION["running"] echo's nothing, so is not set TRUE anymore!!!I also tried "javascript:void()" instead of "javascript:void(0)" Any help?
  22. I have tried all of the next: mkdir('test/')mkdir('test') chdir('../');$albumfolder = getcwd() . '/secure';mkdir($albumfolder); chdir('../');$albumfolder = getcwd() . '/secure/';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/secure';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/secure/';mkdir($albumfolder); chdir('../../');$albumfolder = getcwd() . '/public_ftp/secure/';mkdir($albumfolder); Also tried the 0777 value... NOTHING worked!Any help?
  23. Bogey

    Crypt, Sha1

    Hi all, What to use for password (login)?First I though to use SHA1, but then I read on the world wide web, it is better to use crypt for passwords, cause that is much safer... I have this piece of code: echo crypt($_SESSION["password"]); This are the outcomes, of 4 times given password "test": $1$9TpTTJKO$SIQLX/ehQ7TXMuWro23z91$1$uE0uZBIG$v3T8NPe0PK7BxkPwNLQJR1$1$4N0HG4c3$5N4d6w2qIhjTdkh5nmRfz.$1$2sNz44X1$6Ss5qcCsKxYKgZEiKhq0p0 So I get everytime another hash :SHow come? Isn't it possible to use crypt? What can I use BEST for handeling passwords?
  24. Hi folks, 2 examples: <div id='one'><p>test test test<p><p>test test test<p><p>test test test<p><p>test test test<p></div> AND <div id='two'><p>test test test<p> <table class='table_naw' border='1'><tr><th>Bedrijfsnaam:</th><th>" . $row['bedrijfsnaam'] . "</th></tr><tr><th>Straat:</th><th>" . $row['straat'] . "</th></tr><tr><th>Postcode:</th><th>" . $row['postcode'] . "</th></tr><tr><th>''</th><th>''</th></tr><tr><th>Email:</th><th>" . $row['email'] . "</th></tr><tr><th>Telefoon:</th><th>" . $row['telefoonnummer'] . "</th></tr></div> This is in the css: #one/two{background-image:url('/images/background_koper_toevoegen.jpg');background-size:100%;font-size: 1em;padding:1em;width:50em;min-height:250px;overflow:hidden;/*dit zorgt ervoor dat de child divs toch gezien worden aangezien ze float zijn*/} Underneath the div (one or two) I have another div(x)... Div ONE runs perfect!!!!Div TWO doesnt!!! :s With div two I see the backgroundimage, but the table comes after div(x). So div[x] is placed over div TWO... I tried the overflow, but that did not help, cause div(x) is not floating inside div TWO... It has something to do with the table... I guess the table height is ignored somehow? So again:When I use div ONE, then it looks fine... then I see div one with all its text inside, and after div ONE comes div(X) like it supposed to be.... When I use div TWO, then it looks like a mess.... then I see div one with its text then I see div(x) (I suppose it is over div ONE), then I see the table, and then underneath div TWO there is nothing... Hope all above is a little clear to you?
  25. I have a: <input name='text' id='textPostcode' tabindex='4' class='wide' maxlength='7' onChange='postcodeCheck_ak()'/> function postcodeCheck_ak(){DB_getOneItem('textWoonplaats', postcodeGetallen, 'woonplaats');DB_getOneItem('textProvincie', postcodeGetallen, 'provincie');} function DB_getOneItem(targetID, postcode, plaatsprov){run_xmlhttp();xmlhttp.onreadystatechange=function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(targetID).value=xmlhttp.responseText;}} xmlhttp.open('GET', 'modules/db_getOneItem.php?a=' + postcode + '&b=' +plaatsprov , true);xmlhttp.send();} This is 'DB_getOneItem.php' <?phpinclude($_SERVER["DOCUMENT_ROOT"]."/config.php"); //Include de config met username en passwords mysql_connect("localhost",$GLOBALS["dbuser"],$GLOBALS["dbpass"]) or die(mysql_error());mysql_select_db($GLOBALS["dbname"]); $postcode = $_GET['a'];$plaatsprov = $_GET['b']; $result=mysql_query("SELECT $plaatsprov FROM plaatsen WHERE postcode='$postcode'");$row= mysql_fetch_array($result); echo $row[$plaatsprov];?> So I want both the lines in function postcodeCheck_ak been run, but now only the last line is excecuted?Those 2 lines, have to fill in 2 different textboxes with the certain values... Is this possible?
×
×
  • Create New...