0

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

2
Contributors
15
Replies
16
Views
6 Years
Discussion Span
Last Post by makman99
0

<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"

Edited by makman99: n/a

0

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

0

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.

0

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();">
0

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...

0

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

0

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

Have you tried just using plain HTML for the image?

Edited by makman99: n/a

0

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');
                        }
                   });
            }
0

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

0

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.

Edited by makman99: n/a

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.