Login   Register  
PHP Classes
elePHPant
Icontem

Capture Selected Text

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Cascade Drop Down  >  All threads  >  Capture Selected Text  >  (Un) Subscribe thread alerts  
Subject:Capture Selected Text
Summary:How to pass selected text to another page
Messages:1
Author:Joe Lalicata
Date:2010-02-21 11:32:03
 

  1. Capture Selected Text   Reply  
Picture of Joe Lalicata
Joe Lalicata
2010-02-21 11:32:03
Hello Gobinathm,

Before I get to my core question, could the code be used in a commercial website? For example that code itself would never be a product or directly sold from the website. The site is a home products and services search engine where the Cascade Drop Down code allows the user to select from product and service categories. The selections are then passed to a results page where a MySQL query is performed using the passed variables (a number value).

This leads me to my question. To pass the values, I have used the 'getElementById().value' function. The problem is, I would also like to pass the text that is associated to the number value. I have tried using the 'getElementsById().innerhtml' function but, that passes the entire array of text. Is there any way to limited the text to just the value that is selected in the combobox? Thanks!!!

Joe