Simple JS question...

2009-09-16 Thread Che Vilnonis
Hope this one is easy... how can I get the selected value from a form's select box and then pass that value as a variable in a href? Can it be done with an onClick event? a onclick=*some js here*; href=/account/index.cfm?mode=wishlistproductid=*js value here*Add to Wishlist/abr / Thanks, Che

Re: Simple JS question...

2009-09-16 Thread Charlie Griefer
not tested, but something like: a href=# onclick=takeMeThere();Add to Wishlist/a script type=text/javascript function takeMeThere() { var mySelectBox = document.getElementById('mySelectBox'); var productID = mySelectBox.options[mySelectBox.selectedIndex].value;

RE: Simple JS question...

2009-09-16 Thread Duane Boudreau
[mailto:ch...@asitv.com] Sent: Wednesday, September 16, 2009 3:54 PM To: cf-talk Subject: Simple JS question... Hope this one is easy... how can I get the selected value from a form's select box and then pass that value as a variable in a href? Can it be done with an onClick event? a onclick

RE: Simple JS question...

2009-09-16 Thread Che Vilnonis
Charlie/Duane... Thanks. That did the trick! -Original Message- From: Charlie Griefer [mailto:charlie.grie...@gmail.com] Sent: Wednesday, September 16, 2009 3:02 PM To: cf-talk Subject: Re: Simple JS question... not tested, but something like: a href=# onclick=takeMeThere();Add

Re: Simple JS question...

2009-09-16 Thread Dave Watts
Hope this one is easy... how can I get the selected value from a form's select box and then pass that value as a variable in a href? Can it be done with an onClick event? a onclick=*some js here*; href=/account/index.cfm?mode=wishlistproductid=*js value here*Add to Wishlist/abr / The

Simple JS Question?

2009-07-31 Thread Che Vilnonis
Take this simple form snippet: form action=searchResults.cfm input name=searchField type=text value=#url.searchField# a onmouseover=(window.status='Search...'); return(true); href=javascript:location.href='searchResults.cfm?searchField=' + document.top_search.searchField.value;img

Re: Simple JS Question?

2009-07-31 Thread Dave Watts
Using JS, how can I replace all spaces with plus (+) signs? Can it be done inline, or must I create a JS function? You can use the escape function built into JavaScript; this is analogous to URLEncodedFormat in CF. http://www.w3schools.com/jsref/jsref_escape.asp This won't replace spaces

RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis
[mailto:dwa...@figleaf.com] Sent: Friday, July 31, 2009 3:37 PM To: cf-talk Subject: Re: Simple JS Question? Using JS, how can I replace all spaces with plus (+) signs? Can it be done inline, or must I create a JS function? You can use the escape function built into JavaScript

Re: Simple JS Question?

2009-07-31 Thread Dave Watts
Thanks Dave. In isn't quite working. What's interesting is that if I enter a search term and then hit the enter key, I get the pluses in the url. If I click the submit button with my mouse, I get the spaces between the search term in the url. If you hit enter, you're submitting the form. If

RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis
the designer's layout functional. ~Che -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Friday, July 31, 2009 3:55 PM To: cf-talk Subject: Re: Simple JS Question? Thanks Dave. In isn't quite working. What's interesting is that if I enter a search term and then hit

Re: Simple JS Question?

2009-07-31 Thread Dave Watts
Dave I would... but the actual example is a bit more complicated. Basically, I'm using CSS to create a background image that sits under a form text box. I then use a a href around a invisible spacer.gif to submit via a mouse click. The site is complicated design wise... I'm only trying to

RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis
Thank you Dave... a simple solution indeed! -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Friday, July 31, 2009 4:25 PM To: cf-talk Subject: Re: Simple JS Question? Dave I would... but the actual example is a bit more complicated. Basically, I'm using CSS

Simple JS question

2002-08-17 Thread Douglas Brown
I ahve a page where there is an iframe and the links that I would like to use to opoulate it are within an image map. How do I reference the iframe in the map to populate it with differnet pages. example area shape=rect coords=211,29,253,39 href=# iframe frameborder=0 height=400 width=500

Re: Simple JS question

2002-08-17 Thread Brook Davies
area shape=rect coords=211,29,253,39 href=showme.html target=content At 04:50 PM 17/08/02 -0700, you wrote: I ahve a page where there is an iframe and the links that I would like to use to opoulate it are within an image map. How do I reference the iframe in the map to populate it with

Re: Simple JS question

2002-08-17 Thread Douglas Brown
GeeeshI feel stupid now CF_HEADBETWEENLEGS Douglas Brown Email: [EMAIL PROTECTED] - Original Message - From: Brook Davies [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, August 17, 2002 5:06 PM Subject: Re: Simple JS question area shape=rect coords

Re: Simple JS question

2002-08-17 Thread Brook Davies
5:06 PM Subject: Re: Simple JS question area shape=rect coords=211,29,253,39 href=showme.html target=content At 04:50 PM 17/08/02 -0700, you wrote: I ahve a page where there is an iframe and the links that I would like to use to opoulate it are within an image map. How do I reference