runnerjp
asked on
clicking a button to enter website
basicly i want to do this...
by clicking a button a window pops up where i can enter a webaddress... once done click on and it adds it to my txtbox.. currently using just a button
by clicking a button a window pops up where i can enter a webaddress... once done click on and it adds it to my txtbox.. currently using just a button
<input type='button' value='Email' name='btnImg' onclick='wrapText(document.getElementById('inputforum'),'[email]','[/email]');'>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok i tried the code below form fourice but it wont inset into my textbox and i also want the outcome to be [url] address [/url]
<script>
function getAddress()
{
var anAddress = prompt("Address", "Type an address here");
document.getElementById('inputforum').value=anAddress;
}
</script>
<input type="button" onclick="getAddress()" value="Ask"></div>
<input name="title" type="hidden" value="<?php echo $gettopic3['title'];?>" />
<textarea id="inputforum" class="inputforum" name='yourpost' rows='5' cols='40'><?php if(isset($_POST['quote'])) {
$quote= $_POST['quote'];
$query = "SELECT * FROM forumtutorial_posts where postid=$quote";
if ($result = mysql_query($query)){
if (mysql_num_rows($result)) {
$array = mysql_fetch_assoc($result);}
?>
[quote] Originally Posted by:<strong><?php echo $array['author'];?></strong>
<br><?
echo $array['post']; echo '[/quote]';}}?> </textarea>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Tomarse111: no worries, we just want to help out someone else.
I hope it works for you runnerjp.
I hope it works for you runnerjp.
ASKER
that works great guys... i will be awarding u both :D
Open in new window