• 0

Help with Message Form and Images


Question

Hi,

I'm working on a form for visitors messages. I'd like to add a row of several images, that when clicked they add text in the message area where the cursor is located. In the example that I've included I'd just like to have the word "[This]" added when the visitor clicks the This.gif button image, etc.

I'd appreciate any help or examples that I can use to make this work in my Message Form.

Thanks,

Terry Cadd

<html>
<head>
<title>Message Form</title>
</head>
<body>
<form method="POST" action="/cgi-bin/cgiemail/websitename/cgidata.dat">
<p><img border="0" src="This.gif" width="20" height="20">
<img border="0" src="That.gif" width="20" height="20">
<p>Message:<br>
<textarea name="message" rows="10" cols="70" wrap></textarea>
<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>

Link to comment
https://www.neowin.net/forum/topic/700490-help-with-message-form-and-images/
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi,

I am looking for a script function similar to the AddWord function that I worked up below. The script function needs to be like an InsertWord function that inserts the word where the cursor is located. It will work just like adding smilie icons to your message when you go to post a message here. This is the version that I've worked up with the AddWord function for an example.

Thanks for your help.

Terry

<html>
<head>
<title>Insert Icon</title>
<script>
function AddWord(word)
 { 
  document.getElementById('required-message').value=document.getElementById('required-message').value + word; 
 }
</script>
</head>
<body>
<p align="center"><b>Insert Icon</b></p>
<form method="POST" action="/cgi-bin/cgiemail/websitename/someform.cgi">
<center>
<a title="Smile"><img border="0" src="{Smile}.gif" onclick="AddWord('{Smile}');" width="16" height="16"></a>
<a title="Frown"><img border="0" src="{Frown}.gif" onclick="AddWord('{Frown}');" width="16" height="16"></a>
<br>
<textarea name="required-message" rows="9" cols="30" wrap></textarea>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • If someone chooses to continue using SB and therefore goes through the manual intervention in the thread, afterwards the BSOD problem is gone. Whether they then re-enable the task doesn't matter, they're done, though on such machines it might pay to keep it disabled in case the next update (if there is a next) causes the same problem. OTOH, if someone disables SB in the BIOS, the problem is also gone. Incidentally, I noticed that this task exists even on machines that don't support SB. It's just installed across the board...and runs. Doing what on such machines is a little hazy.
    • qBittorrent 5.2.2 by Razvan Serea The qBittorrent project aims to provide a Free Software alternative to µtorrent. qBittorrent is an advanced and multi-platform BitTorrent client with a nice user interface as well as a Web UI for remote control and an integrated search engine. qBittorrent aims to meet the needs of most users while using as little CPU and memory as possible. qBittorrent is a truly Open Source project, and as such, anyone can and should contribute to it. qBittorrent features: Polished µTorrent-like User Interface Well-integrated and extensible Search Engine Simultaneous search in most famous BitTorrent search sites Per-category-specific search requests (e.g. Books, Music, Movies) All Bittorrent extensions DHT, Peer Exchange, Full encryption, Magnet/BitComet URIs, ... Remote control through a Web user interface Nearly identical to the regular UI, all in Ajax Advanced control over trackers, peers and torrents Torrents queueing and prioritizing Torrent content selection and prioritizing UPnP / NAT-PMP port forwarding support Available in ~25 languages (Unicode support) Torrent creation tool Advanced RSS support with download filters (inc. regex) Bandwidth scheduler IP Filtering (eMule and PeerGuardian compatible) IPv6 compliant Available on most platforms: Linux, Mac OS X, Windows, OS/2, FreeBSD qBittorrent 5.2.2 changelog: FEATURE: Use D-Bus to show file in file managers (Chocobo1) #24340 BUGFIX: Fix friendlyUnitCompact precision calculation (vafada) #24323 BUGFIX: Remove all top-level folders (glassez) #24333 BUGFIX: Use proper API for checking exit status (Chocobo1) #24349 BUGFIX: Delete stale lockfile when hostname mismatch (TurboTheTurtle, glassez) #24363 BUGFIX: Fix wrong removal procedure of watched folder paths (Chocobo1) #24413 BUGFIX: Don't reannounce before interface changes are applied (glassez) #24447 BUGFIX: Use Latin script for Bosnian locale name (Andy Ye) #24342 WEBUI: Fix performance of global checkbox toggling (tehcneko) #24316 WEBUI: Fix Safari transfer list header misalignment (Piccirello) #24377 WEBUI: Fix error when submitting magnet before metadata loads (Piccirello) #24378 WEBUI: Use correct row id when updating Rss Downloader feed selection (Chocobo1) #24402 WEBUI: Use SameSite=Lax for session cookie to fix cross-site login (Piccirello) #24422 WEBUI: Bring back properties panel expand/collapse button (vafada) #24430 WEBAPI: Only use X-Forwarded-Host header when reverse proxy support is enabled (Chocobo1) #24457 RSSS: Fix "RSS Smart Episode Filter" RegEx (nathanon-akk, glassez) #24398 RSS: Fix previously matched episode format (glassez) #24452 WINDOWS: Fix Python fallback search path (TurboTheTurtle) #24325 WINDOWS: NSIS: Allow to install x64 binary on ARM64 (Chocobo1) #24358 Download: qBittorrent 5.2.2 | 41.1 MB (Open Source) Download: qBittorrent 64-bit installer (qt6) | 43.6 MB Links: qBittorrent Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Weechat. https://weechat.org/
    • they should stop making bad games that no one asked for
  • Recent Achievements

    • Veteran
      branfont went up a rank
      Veteran
    • Reacting Well
      Almohandis earned a badge
      Reacting Well
    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      483
    2. 2
      +Edouard
      183
    3. 3
      PsYcHoKiLLa
      123
    4. 4
      Steven P.
      87
    5. 5
      neufuse
      72
  • Tell a friend

    Love Neowin? Tell a friend!