-
Posts
295 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Lulzim
-
-
forget the first one, this is betterhere is an example with 2 textareas
<html><head><script type='text/javascript'>function addBB (text, target){ document.getElementById(target).value+=text;}</script></head><body><form action="somefile.php" id="form1"><input type='button' value='Italic' onclick="addBB('[i]ITALIC_TEXT[/i] ', 'txt');"><input type='button' value='bold' onclick="addBB('[b]BOLD_TEXT[/b] ', 'txt');"><input type='button' value='underline' onclick="addBB('[u]UNDERLINE_TEXT[/u] ', 'txt');"><input type='button' value='url' onclick="addBB('[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ', 'txt');"><input type='button' value='color' onclick="addBB('[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ', 'txt');"><input type='button' value='image' onclick="addBB('[img=IMAGE_PATH] ', 'txt');"><input type='button' value='align' onclick="addBB('[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ', 'txt');"><br><textarea cols='80' rows='10' id='txt' name='txt'></textarea><br> <br><input type='button' value='Italic' onclick="addBB('[i]ITALIC_TEXT[/i] ', 'txt2');"><input type='button' value='bold' onclick="addBB('[b]BOLD_TEXT[/b] ', 'txt2');"><input type='button' value='underline' onclick="addBB('[u]UNDERLINE_TEXT[/u] ', 'txt2');"><input type='button' value='url' onclick="addBB('[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ', 'txt2');"><input type='button' value='color' onclick="addBB('[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ', 'txt2');"><input type='button' value='image' onclick="addBB('[img=IMAGE_PATH] ', 'txt2');"><input type='button' value='align' onclick="addBB('[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ', 'txt2');"><br><textarea cols='80' rows='10' id='txt2' name='txt'></textarea><br><input type='submit' value='save'></form></body></html>
when you call the addBB function, the first argument is the text which you want to add when button is clicked and the second argument is the target textarealike this:addBB('text_to_display', 'target_textarea')you can add as much textareas you want :)btw. this doesn't have anything to do with php, somebody move this thread to javascript forum
-
for everyone, in each button you have to specify where the text will be added
-
here is a very simple one
<html><head></head><body><form action="somefile.php"><input type='button' value='Italic' onclick="txt.value+='[i]ITALIC_TEXT[/i] ';"><input type='button' value='bold' onclick="txt.value+='[b]BOLD_TEXT[/b] ';"><input type='button' value='underline' onclick="txt.value+='[u]UNDERLINE_TEXT[/u] ';"><input type='button' value='url' onclick="txt.value+='[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ';"><input type='button' value='color' onclick="txt.value+='[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ';"><input type='button' value='image' onclick="txt.value+='[img=IMAGE_PATH] ';"><input type='button' value='align' onclick="txt.value+='[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ';"><br><textarea cols='100' rows='10' id='txt' name='txt'></textarea><br><input type='submit' value='save'></form></body></html>
-
to upload use any simple upload script, you can find a lot on internet for viewing, use this tutorial on w3schoolshttp://www.w3schools.com/media/media_browservideos.asp
-
you can also use these meta tags:
<meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache">
-
i have used this kind of advertisement on my we page before, but i didn't create a script myselfthere are a lot of advertisement websites/companies that offer these kind of services have a look at this site:http://www.vibrantmedia.com/webpublishers/index.aspeven the website that you provided in previous post uses this kind of advertisements
-
this one works fine:
<html><head><title>test page</title><script type='text/javascript'>function addText(){ var myArray = new Array("Sam","Pete"); document.getElementById("addTextHere").innerHTML += "Posted By "+myArray[0];}</script></head><body><input type='button' value='click me' onclick="addText();"><br><br><div id='addTextHere'>InnerHTML text goes here: </div></body></html>
-
you changed the condition here from != to == :<?php if ($row_RSsales['website'] == '') { echo '<a href="' . $row_RSsales['website'] . '" target="_blank">' . $row_RSsales['name'] . '</a>'; } else { echo $row_RSsales['name']; }?>
that should do it.love,jason
if ($row_RSsales['website'] == '')
it should be like this:
if ($row_RSsales['website'] != '')
capturing PHP version you are running under
in PHP
Posted
phpversion() function returns a string containing current php version