hi,
i don't know coding and trying to find if is it possible to have a text area pre filled and has an image and a link and some text. is it possibele? below is what i am trying to do
please help. thank you
this is what i would like to do

<form name="statusUpdate" action="" method="">
<textarea type="hidden" name="status" id="status" rows="400" cols="500">
<http://www.mywebsite.com/> ---come to my website---
<image> ttext text
text text
<http://www.mywebsite.com/> ---- come to my website---
</textarea>

<body onLoad="updateStatusViaJavascriptAPICalling();">

unfortunatly this is what i have

<form name="statusUpdate" action="" method="">
<textarea type="hidden" name="status" id="status" rows="400" cols="500">
http://www.mywebsite.com/
text text
text text
http://www.mywebsite.com/
</textarea>

<body onLoad="updateStatusViaJavascriptAPICalling();">

many thanks

<textarea> can only contain plain text. No code or images.
What is the point of this textarea? Are you doing it with only HTML or is PHP an option?

From the "<form name='statusUpdate'..." it looks like this will be displayed on a page?

If that's the case, use what all forums use, BBcode.
BBcode just replaces characters with HTML, so

[image]link[/image]
would be
<img href="link" />
Search for replacing strings with php, or find a pre-built BBcode "plugin"

yeah but i cannot do that,i have to do it only on that page
if that is not possible, is there a way to replace the textarea with something else and still be able to use this <body onLoad="updateStatusViaJavascriptAPICalling();">

thanks

So you only have HTML to work with?
What does the javascript function do?

And why is your <body> tag after output? It should be above anything being printed.

i honestly dont know.
and the file is actually a php file. there was a text area for users to fill and submit and i think the function is handle somewhere else but i wanted to change it to pre filled and sumbitted automaticly when users visit that page and it does it but unfortunatly i cannot add an image or hide the full link it shows the whole thing
thanks

<style type="text/css">
    #tabs ul li{
        font-size: 80%;
    }
    #tabs pre{
        font-size: 138%;
    }
    #tabs{
        font-size: 70%;
    }
    #tabs div a{
        color: blue;
    }
    .ui-tabs .ui-tabs-nav {
        padding: 0 !important;
    }
</style>
    
        


<form name="statusUpdate" action="" method="">
<textarea type="hidden" name="status" id="status" rows="400" cols="500">
http://www.mywebsite.com/
text text
text text
http://www.mywebsite.com/
</textarea>

<body onLoad="updateStatusViaJavascriptAPICalling();">

So when users visit this page, it automatically sends data from a textbox?
What is the data doing? Is it being put into a sql table for display?

If that's the case, why not scrap the textbox, and just make a variable that contains HTML for what you want it to look like. Use regular <img> tags for images, etc...

i dont understand, i have no understanding of coding and there are others codes are handling things, all i want to do is submit that data using with this
<body onLoad="updateStatusViaJavascriptAPICalling();">
and it seems to work with that form with a text area.

thanks

Can you find the file containing that function and post the function here.

Have you tried just using plain HTML for the image?

i think this is it but i am not sure

function updateStatus(){
                var status  =   document.getElementById('status').value;
                
                jQuery.ajax({
                    type: "POST",
                    url: "<?=$fbconfig['baseUrl']?>/ajax.php",
                    data: "status=" + status,
                    success: function(msg){
                        alert(msg);
                    },
                    error: function(msg){
                        alert(msg);
                    }
                });
            }
            function updateStatusViaJavascriptAPICalling(){
                var status  =   document.getElementById('status').value;
                    FB.api('/me/feed', 'post', { message: status }, function(response) {
                        if (!response || response.error) {
                             alert('Error occured');
                        } else {
                             alert('Status updated Successfully');
                        }
                   });
            }

Ok, try
<img href="linkhere" />
replace linkhere with your image link and see if that does what you want.

that what exactly happens

Wow I feel stupid.
It's supposed to be "src=" not "href="
But that still won't work. Where did you get this code from? It looks like you'll need to change some stuff so it allows HTML.

oh well i cannot, and i cannot reach to the person, i gess i will have to use it the way it, i appreciate you trying to help

thanks

would anyone has any other idea?

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.