|
errant -> RE: A little help please (10/25/2006 1:34:49)
|
THis is not as easy an answer as you think! Im assuming you mean that you want the link to be converted to an image when you click 'send' or 'save' (or whatever) so that when what has been submitted is displayed on the page it appears as an image? If thats the case the solution really depends on what scripts your using. The simplest way would be to copy the full html <img tag from photobucket (the second box down on the photobucket page - the one that starts <a href="...) because then that will display as an image when it appears on the page. If you want to use another method it becomes more complicated. You can send the form data to a PHP script that adds the html automatically. In this case you should be using the [IMG]image url[/IMG] tag photobucket provide so the PHP script can see it is an image. Heres and example of how to do it: (it assumes you called the textbox 'mydata') // Get the posted form data from the text box as a variable $text_data = $_POST['mydata']; // Replace the first [img] tag with html $text_data = string_replace('[IMG]', '<img src="', $text_data); // Now we need to add a little more html at the end to replace [/IMG] $text_data = string_replace('[/IMG]', '" />', $text_data); // Display the modified output echo $text_data; Ok so if your not using PHP then the javascript method is an option - but more complcated (IMO). Plus I cant do it in JS so if thats what you want someone else will have to help!! On the other hand if - when you paste the URL into the text boxyou want the image to automatically appear right then IN the text box then your in for some serious Javascript fun! Its not easy......
|
|
|
|