• Inloggen
  • Registreer
  • Zoeken
Dit topic
  • Overal
  • Dit topic
  • Dit forum
  • Artikelen
  • Pagina's
  • Forum
  • Downloads
  • Meer opties

ICTscripters

Dé plek voor IT

Dé plek voor IT

Aanmelden

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. (X)HTML + XML + CSS

Forum

  • Port Father: beta van een browsergame in Antwerpen 1931, feedback welkom

    Jeroen.G 26 oktober 2026 om 10:33
  • Maffia Hotel: een browsergame waarin je van lobbygast naar spil van het hotel groeit

    eeyk 22 oktober 2026 om 18:43
  • Crime Club volledig herschreven vanaf nul

    frio 19 oktober 2026 om 23:57
  • Malavita (nieuwe maffia game, van 0)

    jos 19 oktober 2026 om 23:18
  • Herkent deze Notion-structuurscan echte problemen?

    Jeroen.G 19 oktober 2026 om 15:09
  • 🚀 WE ZOEKEN TESTERS! 🚀

    Servertjee 3 oktober 2026 om 10:56
  • Luchtvaartsoftware: Hoe technologie de moderne luchtvaart verandert

    saggy2829 30 september 2026 om 19:31
  • Hoe gebruiken jullie WhatsApp voor marketing en klantopvolging?

    aiqanobzfsej5 29 september 2026 om 12:55

Marktplaats

  • [TE KOOP] Malavita.be [Maffiaspel, gebaseerd op omicidio.nl, unieke code]

    Dpm_x 26 oktober 2026 om 00:22
  • TK: Kraai.eu

    frio 25 oktober 2026 om 11:39
  • [TE KOOP] Likeboost24.nl: complete SMM-webshop met eigen merk, volautomatische levering en betalen op de eigen pagina

    Jeroen.G 16 oktober 2026 om 14:27

Variables

  • arendjee
  • 28 mei 2011 om 15:59
  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 15:59
    • #1

    Ik ben nu aan het leren met ajax / javascript en liep tegen een probleem aan maar lars heb daar mee geholpen maar nu zit ik met nog een vraagje is het mogelijk om in ajax/javascript php echo's / variables te gebruiken ? zodat ik de site volledig in ajax / javascript kan doen . :)

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

  • Gast, wil je besparen op je domeinnamen? (ad)
  • thexerox
    thexeroxprojects.be
    Berichten
    414
    • 28 mei 2011 om 16:12
    • #2

    Ja zeker :)

    Bv:

    PHP
    <script type="text/javascript">
    var MyFirstVar = <?php echo 'Hier komt mijn eerste var'; ?> ;
    </script>
  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 16:15
    • #3

    en hoe kan ik die dan bijvoorbeeld hier in aan roepen

    PHP
    $(this).html("jeverdient 'hier moet de var' euro").addClass("messageboxok_form").fadeTo(900, 1, function(){

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

  • thexerox
    thexeroxprojects.be
    Berichten
    414
    • 28 mei 2011 om 16:17
    • #4
    PHP
    <script type="text/javascript">
    var MyFirstVar = <?php echo 'Hier komt mijn eerste var'; ?> ;
    $(this).html("Je bent zojuist aangemeld "+MyFirstVar+" Activeer je mail").addClass("messageboxok_form").fadeTo(900, 1, function(){ 
    </script>
  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 16:18
    • #5

    oehhw thnx ik ge even kijken :D

    Nieuwe reactie samengevoegd met originele reactie op 28.05.11 16:22:58:
    Tooen werkte het hele script nie meer:o

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

  • thexerox
    thexeroxprojects.be
    Berichten
    414
    • 28 mei 2011 om 16:24
    • #6

    post je volledige script eens :)

  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 16:26
    • #7

    http://pastebin.com/54w8pAW9

    Ik weet dat het korter kan maar is meer om te testen en het beetje onder de knie te krijgen :)

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

  • thexerox
    thexeroxprojects.be
    Berichten
    414
    • 28 mei 2011 om 16:28
    • #8

    Je var moet binnen "$(document).ready(function()
    {" + op regel 8 staat een; teveel

  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 16:30
    • #9

    hmmz heb het veranderd maar nu doet nog niets het:o

    Nieuwe reactie samengevoegd met originele reactie op 28.05.11 16:33:43:

    PHP
    var MyFirstVar = <?php echo $_POST['username']; ?> ;

    als dat er bij staat werkt de rest niet meer>.<

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

  • thexerox
    thexeroxprojects.be
    Berichten
    414
    • 28 mei 2011 om 16:39
    • #10
    PHP
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
    
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
    <script type="text/javascript">
    
    
    
    
    $(document).ready(function()
    {
     
    	$("#username").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#msgbox").removeClass().addClass('messagebox').text('Kijken in de database').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/user_availability.php",{ user_name:$(this).val() } ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Deze gebruikersnaam bestaat al').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
              	else	  {
    		  	$("#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Deze naam is nog niet in gebruik').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
    $(document).ready(function()
    {
     
    	$("#pass").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#passmessage").removeClass().addClass('messagebox').text('Wachtwoord check').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/pass_check.php",{ user_name:$('#username').val(),pass:$('#pass').val() } ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je wachtwoord is het zelfde als je gebruikersnaam').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		  
    		  else if(data=='min') //if username not avaiable
    		  {
    		  	$("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je moet minimaal 8 tekens in je wachtwoord').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		  else if(data=='empty') //if username not avaiable
    		  {
    		  	$("#passmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je moet wel wat invullen').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    else		  {
    		  	$("#passmessage").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Dit wachtwoord is goed').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
    $(document).ready(function()
    {
     
    	$("#regels").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#regelbericht").removeClass().addClass('messagebox').text('Regelcheck').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/regel_check.php",{ regels:$('#regels').val()} ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#regelbericht").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Accepteer de regels').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		 
    else		  {
    		  	$("#regelbericht").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je heb de regels geaccepteert').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
    
    
    $(document).ready(function()
    {
     
    	$("#pass2").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#herhaalmessage").removeClass().addClass('messagebox').text('Wachtwoord check').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/pass_herhaal.php",{ pass:$('#pass').val(),pass2:$('#pass2').val() } ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#herhaalmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je wachtwoorden zijn niet gelijk').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		  
    		  
    else if(data=='empty') //if username not avaiable
    		  {
    		  	$("#herhaalmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je heb geen wachtwoord ingevult').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		  
    		  
    else		  {
    		  	$("#herhaalmessage").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je wachtwoorden zijn gelijk').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
    $(document).ready(function()
    {
     
    	$("#mail2").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#mail2message").removeClass().addClass('messagebox').text('Mail check').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/mail_herhaal.php",{ mail:$('#mail').val(),mail2:$('#mail2').val() } ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#mail2message").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je mail adressen zijn niet identiek').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    		  
    		  
    else	if(data=='empty') //if username not avaiable
    		  {
    		  	$("#mail2message").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je moet wel wat invullen').addClass('messageboxerror').fadeTo(900,1);
    			});		
              } else
    		  	  {
    		  	$("#mail2message").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Je email adrres zijn gelijk').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
    $(document).ready(function()
    {
    
    
    
    
    
    
    	$("#mail").blur(function()
    	{
    		//remove all the class add the messagebox classes and start fading
    		$("#mailmessage").removeClass().addClass('messagebox').text('Kijken in de database').fadeIn("slow");
    		//check the username exists or not from ajax
    		$.post("register/mail_availability.php",{ user_name:$(this).val() } ,function(data)
            {
    		  if(data=='no') //if username not avaiable
    		  {
    		  	$("#mailmessage").fadeTo(200,0.1,function() //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Deze mail is al ingebruik').addClass('messageboxerror').fadeTo(900,1);
    			});		
              }
    else		  {
    		  	$("#mailmessage").fadeTo(200,0.1,function()  //start fading the messagebox
    			{ 
    			  //add message and change the class of the box and start fading
    			  $(this).html('Mail naam is nog niet in gebruik').addClass('messageboxok').fadeTo(900,1);	
    			});
    		  }
    				
            });
     
    	});
    });
    
    
     $(function(){
    							
    				var MyFirstVar = '<?php echo $_POST["username"]; ?>' ;
    
    
            $("#register_form").submit(function(){
    
    
                //remove all the class add the messagebox classes and start fading 
                $("#aangemeldtekst").removeClass().addClass("messagebox_form").text("Account aan maken").fadeIn(1400); 
                //check the username exists or not from ajax 
                $.ajax({
                    type: "POST",
                    url: "register/ajax_register.php",
                    data: "user_name=" + $("#username").val() + "&pass=" + $("#pass").val() + "&pass2=" + $("#pass2").val() + "&mail=" + $("#mail").val() + "&mail2=" + $("#mail2").val() + "&regels=" + $("#regels").val() + "&rand=" + Math.random(),
                    success: function(msg){
                        if(msg == "yes"){ //if correct login detail
                            $("#aangemeldtekst").fadeTo(200,0.1,function(){  //start fading the messagebox
                                //add message and change the class of the box and start fading
    														
    
    
    
    
    
    
                                $(this).html("Je bent zojuist aangemeld "+MyFirstVar+" Activeer je mail").addClass("messageboxok_form").fadeTo(900, 1, function(){
                                    //redirect to secure page
                                });
                            });
                        } else{
                            $("#aangemeldtekst").fadeTo(200, 0.1, function(){ //start fading the messagebox
                                //add message and change the class of the box and start fading
                                $(this).html("Je kon je niet aan melden probeer het opnieuw...").addClass("messageboxerror_form").fadeTo(900, 1);
                            });
                        }
                    }
                });
                return false; //not to post the  form physically 
            }); 
            //now call the ajax also focus move from  
            $("#register_form").blur(function(){
                $("#register_form").trigger("submit"); 
            }); 
        });
    </script>
    <style type="text/css">
    body {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:11px;
    }
    .top {
    margin-bottom: 15px;
    }
    .messagebox{
    	position:absolute;
    	width:auto;
    	margin-left:30px;
    	border:1px solid #c93;
    	background:#ffc;
    	padding:3px;
    }
    .messageboxok{
    	position:absolute;
    	width:auto;
    	margin-left:30px;
    	border:1px solid #349534;
    	background:#C9FFCA;
    	padding:3px;
    	font-weight:bold;
    	color:#008000;
    	
    }
    .messageboxerror{
    	position:absolute;
    	width:auto;
    	margin-left:30px;
    	border:1px solid #CC0000;
    	background:#F7CBCA;
    	padding:3px;
    	font-weight:bold;
    	color:#CC0000;
    }
    
    
    .messagebox_form{
    	position:absolute;
    	width:auto;
    	border:1px solid #c93;
    	background:#ffc;
    	padding:3px;
    }
    .messageboxok_form{
    	position:absolute;
    	width:auto;
    	border:1px solid #349534;
    	background:#C9FFCA;
    	padding:3px;
    	font-weight:bold;
    	color:#008000;
    	
    }
    .messageboxerror_form{
    	position:absolute;
    	width:auto;
    	border:1px solid #CC0000;
    	background:#F7CBCA;
    	padding:3px;
    	font-weight:bold;
    	color:#CC0000;
    }
    
    
    </style>
    </head>
    <body>
    <form method="post" action="" id="register_form">
    
    
    <p>Welkom op true-crime Zin om mee te spelen meld je nu aan. <small>Let er op er komt een activatie link naar je mail</small></p>
    <div>
    <span id="aangemeldtekst" style="display:none"></span>
    
    
    <br><br><br>
    </div>
    
    
    <table >
       <td width="200">User Name :</td>  <td width="200"> <input name="username" type="text" id="username" value="" maxlength="15" /></td>
         <td width="200"><span id="msgbox" style="display:none"></span></td>
    </table>
    
    
    <table >
         <td width="200">Mail adres:</td>  <td width="200"> <input name="mail" type="text" id="mail" value="" maxlength="90" /></td>
        <td width="200"> <span id="mailmessage" style="display:none"></span></td>
    </table>
    
    
    <table >
         <td width="200">Herhaal Mail:</td>  <td width="200"> <input name="mail2" type="text" id="mail2" value="" maxlength="90" /></td>
        <td width="200"> <span id="mail2message" style="display:none"></span></td>
    </table>
    
    
    <table >
         <td width="200">Wachtwoord:</td>  <td width="200"> <input name="pass" type="password" id="pass" value="" maxlength="15" /></td>
        <td width="200"> <span id="passmessage" style="display:none"></span></td>
    </table>
    
    
    
    
    <table >
         <td width="200">Herhaal Pass:</td>  <td width="200"> <input name="pass2" type="password" id="pass2" value="" maxlength="15" /></td>
        <td width="200"> <span id="herhaalmessage" style="display:none"></span></td>
    </table>
    
    
    <table >
         <td width="400" align="left"><input name="regels" type="checkbox" id="regels" /> Accepteer de regels</td>
        <td width="200"> <span id="regelbericht" style="display:none"></span></td>
    </table>
    
    
    <table>
         <td col colspan="10" align="center"><input name="submit" type="submit" id="aanmelden_form" value="Maak account aan" /> </td>
    </table> 
    </form>
    Meer tonen


    Dit werkt;

  • arendjee
    :haha:
    Berichten
    478
    • 28 mei 2011 om 16:54
    • #11

    @therox

    Je bent zojuist aangemeld Activeer je mail :(
    maarja ik ga ff verdxer kijken iedergeval thnx:)
    weet nu hoe je een var der in krijgt:D

    True-Crime V1:
    Outgame: 0%
    Ingame: 0%
    Talen: 0%
    Teksten: 0%

Registratie

Nog geen account? Registreer je nu en word deel van onze community!

Nu registreren Aanmelden

ICT Nieuws

  • PHP waarschuwt voor twee ernstige bugs die makkelijk uit te buiten lijken

    Aaron 22 oktober 2026 om 22:19

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacyverklaring
  10. Contact
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design