Jump to content

BluB

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

BluB's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The split() function will return an array of strings. To get the last string in that array, use: alert(tags[tags.length-1]); However, since you are using the comma key to fire up the script, that would probably give back an empty string as the last string in the array would be empty, so then you could also use: alert(tags[tags.length-2]); Just experiment a bit to see what gives you exactly what you want.
  2. I did notice you made a typo in your SQL statement: $cofirmemailaddress instead of $confirmemailaddress I doubt it's the problem, but figured I might as well point it out.
  3. My input field: <input size="30" id="f_date1" /><br /> The trigger I'm talking about you need to change: trigger : "f_date1", I just used the 'simple.html' file included in the download link I posted earlier, removed the button, and changed the trigger. This is how it looks like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Dynarch Calendar -- Simple popup calendar</title> <script src="../src/js/jscal2.js"></script> <script src="../src/js/lang/en.js"></script> <link rel="stylesheet" type="text/css" href="../src/css/jscal2.css" /> <link rel="stylesheet" type="text/css" href="../src/css/border-radius.css" /> <link rel="stylesheet" type="text/css" href="../src/css/steel/steel.css" /> </head> <body> <input size="30" id="f_date1" /><br /> <script type="text/javascript">//<![CDATA[ Calendar.setup({ inputField : "f_date1", trigger : "f_date1", onSelect : function() { this.hide() }, showTime : 12, dateFormat : "%Y-%m-%d %I:%M %p" }); //]]></script> </body> </html> Are you sure you have it all set up correctly? That you have included all scipts etc? I tried your code (and changed the trigger), and it worked here.
  4. <html> <head> <script type="text/javascript"> function timeMsg() { var t=setTimeout("alertMsg()",3000); } function alertMsg() { var elem = document.getElementById("link"); elem.innerHTML = "<a href=\"#\">Link</a>"; } </script> </head> <body> <form> <input type="button" value="Display alert box in 3 seconds" onClick="timeMsg()" /> </form> <p id="link">A link will appear here!</p> </body> </html> That should help you make it do what you want it to do. You can change the # in "<a href=\"#\">Link</a>" to whatever link you want it to be. Optionally you can use another element like <span> if you want the link to appear somewhere else or in a block of text.
  5. That script appears to be the one that's available here: http://www.dynarch.com/projects/calendar/download/1.9/ If that's the case you can just put 'f_date1' as trigger, like so: <script type="text/javascript">//<![CDATA[ Calendar.setup({ inputField : "f_date1", trigger : "f_date1", onSelect : function() { this.hide() }, showTime : 12, dateFormat : "%d-%m-%Y" }); //]]></script> That worked for me when I tried it.
  6. I read up on this, and found this: http://www.php.net/manual/en/function.mysql-pconnect.php#99380 That will explain what might be causing the problem. You might also just consider using mysql_connect() instead, you should ask yourself if you actually need a persistent connection at all.
  7. The methods mentioned above will actually do that, they allow checking the check box by clicking the cell. This is accomplished with styling of the span element. The reason why we do not put the label tag outside of the cell is exactly because of the reason that it only works in IE that way.
  8. Hey, Either this: $data=str_replace(chr(0xC2).chr(0x80) , chr(0xE2).chr(0x82).chr(0xAC), utf8_encode("Hello ".$name."you have €".$balance") ); Or this: $data=str_replace(chr(0xC2).chr(0x80) , chr(0xE2).chr(0x82).chr(0xAC), "Hello " . $name . "you have €" . $balance); Should work, depending on whether your data is already UTF-8 encoded or not.
  9. As to why it wont work I can't help you. It's just different browsers interpreting things differently. After some testing, what I can tell is that the following works on Chrome, Firefox4, and IE8: <td><label for="foo"><span style="display:block"><input type="checkbox" id="foo" name="option1" value="opt1">option1<br></span></label></td>
  10. You could make $last_msg_id a session variable, that way it'll keep it value even after refreshing. Sessions: http://php.net/manual/en/features.sessions.php Session variable tutorials: http://www.tizag.com/phpT/phpsessions.php http://www.w3schools.com/PHP/php_sessions.asp http://php.about.com/od/advancedphp/ss/php_sessions_2.htm
  11. From what I can see, your code only has a few minor errors. echo "This is the w query" $w_query; Wont work, you'll need to add the two strings together with a . Like this: echo "This is the w query" . $w_query; Also, to get a return value, you just do: function example($i) { $value = $i + 1; return $value; } You do not need to add the return variable to the parameter list. In your example you call "what_Table($scat,$w_query);" without having anything in the $w_query variable, this will give a Notice: Undefined variable: error. So when you call the function, do it like this: $w_query = what_Table($scat); and remove the $w_query from the parameter list. Then it should work just fine and also the echo should work. I hope this helps.
  12. Something like this should also do the trick: Not as optimized, but a bit more simple then using preg_match() imho. //look for the first occurrence of a * for($i = 0; substr($string, $i, 1) != "*"; $i++) { } //look for the first occurrence of a space after the * for($j = $i; substr($string, $j, 1) != " "; $j++) { } //retrieve username from string $username = substr($string, $i +1, $j -$i);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.