Pls, to all in General, I nid a Simple Javascript func or code that Can Pops Up a text box if a particular option is selected in a drop down menu of an html form tag..
I.e
How Do you Want Us to Reach You?
Via:
<select name='contact'><option value='SMS'>SMS</option><option value='Email'>Email</option><option value='Web'>Web</option></select>

So, i want a textbox to be pops out individualy for evry selected option

ie <input type="text" name="sms"> to b Pops out if dem select sms method

<input type="text" name="email"> to b Pops out if dem select email method
and
<input type="text" name="web">
to b Pops out if dem select web method

thanks yet... Any Help rendered would b appreciated!

With the Aid Of this Function, you can Crawl Out the First Occurence Image Url.

If a post Contain

Analike The Baddo Of Destiney
as the post image link,this Function wil crawl it out negleting the [img] and [/img] bbcode.

Xo it wil be nw become this http://netnaija.com/images/featured/analike-the-baddo-of-destiney.png
xo u can use it at ur exclusive update in ur web lyk NetNaija


Code
<?php
function first_img($text,$thumb) {
global $config;
$res = preg_match('#\[img\](.*?)\[\/img\]#is', $text, $matches);
if (!$thumb == '') $text = '<img src="'.$thumb.'" width="48" height="48">';
elseif(!$matches[1] == '') $text = '<img src="'.$matches[1].'" width="48" height="48">';
else $text = '<img src="'.$config->url.'/images/none.png" width="48" height="48">';
return $text;
}
?>

If deres no Image Found In the Post, it wil return default img, xo change the /images/none.png to ur default image link

Now,
fetch the post content and rap it wit the abv function to get the image link
i.e

Code
<?php
$post_content = $info["message"]; $change_tags=preg_replace('#<img(.*?)src="(.*?)"(.*?)>#is','[img]\\2[/img]',$post_content);
$img_first = first_img($change_tags,$post_content = NULL);
?>

And Insert $img_first into ur b_updates. For u to b able to do dis..kindly create a column in ur b_updates named `img`

Code
<?php
ERROR_REPORTING(0);
 
include("init.php");
$query=mysql_query("ALTER TABLE `b_updates` ADD `img` varchar(255) NOT NULL");
if(!$query){
header("location: index.php?msg=error");
} else {
header("location: index.php?msg=success");
}
?>

save as img.php and install...

Goto ur func.php,fetch along the img row and print or echo am as desired. Complicated? Drop Comment below.. Ama reply u

‹‹12››
Viewing Page 2 of 2 pages