Hello,
I have date fields on a form which is generated by a Coldfusion custom
tag (another piece of code). I want to change something else on the
form when the user changes the date. But, how do I generate an
onChange() event on this field (since I only have the call to the
custom tag in this form)?
Thanks in advance for any suggestions.
Jnag 4 2121
"jnag" <pr******@gmail .comwrote in news:1174505780 .987236.193340
@l77g2000hsb.go oglegroups.com:
Hello,
I have date fields on a form which is generated by a Coldfusion custom
tag (another piece of code). I want to change something else on the
form when the user changes the date. But, how do I generate an
onChange() event on this field (since I only have the call to the
custom tag in this form)?
Thanks in advance for any suggestions.
Try this JS (note: execute this line *after* the form has loaded):
document.forms['TheFormName'].elements['TheDateFieldNa me'].onclick =
whatYouWantToDo ;
Jim Land said the following on 3/21/2007 5:10 PM:
"jnag" <pr******@gmail .comwrote in news:1174505780 .987236.193340
@l77g2000hsb.go oglegroups.com:
>Hello,
I have date fields on a form which is generated by a Coldfusion custom tag (another piece of code). I want to change something else on the form when the user changes the date. But, how do I generate an onChange() event on this field (since I only have the call to the custom tag in this form)?
Thanks in advance for any suggestions.
Try this JS (note: execute this line *after* the form has loaded):
document.forms['TheFormName'].elements['TheDateFieldNa me'].onclick =
whatYouWantToDo ;
It would seem to be a better idea to use the onload event of the window
to trigger a function to set it. Then you know, for sure, that it is
available for scripting.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
On Mar 21, 5:10 pm, Jim Land <rrrrfffftttt(n o)@(spam)hotmai l.com>
wrote:
"jnag" <prajy...@gmail .comwrote in news:1174505780 .987236.193340
@l77g2000hsb.go oglegroups.com:
Hello,
I have date fields on a form which is generated by a Coldfusion custom
tag (another piece of code). I want to change something else on the
form when the user changes the date. But, how do I generate an
onChange() event on this field (since I only have the call to the
custom tag in this form)?
Thanks in advance for any suggestions.
Try this JS (note: execute this line *after* the form has loaded):
document.forms['TheFormName'].elements['TheDateFieldNa me'].onclick =
whatYouWantToDo ;
Thank you very much for this suggestion. It works partially (in that,
before I was not able to even fire the event). But, it is implementing
the event function before the form comes up. I want it to happen when
the user changes the date. I have included this line after the
<form...tag just where the date field tag is defined. Is this
probably because the date field is part of the server side custom tag
which has already been executed? Thanks.
"jnag" <pr******@gmail .comwrote in news:1174573152 .118201.37600
@l75g2000hse.go oglegroups.com:
On Mar 21, 5:10 pm, Jim Land <rrrrfffftttt(n o)@(spam)hotmai l.com>
wrote:
>"jnag" <prajy...@gmail .comwrote in news:1174505780 .987236.193340 @l77g2000hsb.g ooglegroups.com :
I have date fields on a form which is generated by a Coldfusion
custom
tag (another piece of code). I want to change something else on the
form when the user changes the date. But, how do I generate an
onChange() event on this field (since I only have the call to the
custom tag in this form)?
>Try this JS (note: execute this line *after* the form has loaded):
document.forms['TheFormName'].elements['TheDateFieldNa me'].onclick = whatYouWantToD o;
Thank you very much for this suggestion. It works partially (in that,
before I was not able to even fire the event). But, it is implementing
the event function before the form comes up. I want it to happen when
the user changes the date. I have included this line after the
<form...tag just where the date field tag is defined. Is this
probably because the date field is part of the server side custom tag
which has already been executed? Thanks.
I think you need to put the onclick line of code much later in the page.
Try just above the /html tag at the end of the page. Or, as Randy
suggested, put it in the body onload event. By then the form will be
completely loaded and any changes the user makes will trigger your
onclick event. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: entact |
last post by:
I've got a simple coldfusion query output (title, id and disclaimer)
that I use to dynamically populate a select box with the title using
the id as the value. What I need is to use javascript to populate a
second text field with the disclaimer when any of the selections are
changed ( so a page reload is not needed).
Thanks for help!
|
by: johkar |
last post by:
When the output method is set to xml, even though I have CDATA around
my JavaScript, the operaters of && and < are converted to XML character
entities which causes errors in my JavaScript. I know that I could
externalize my JavaScript, but that will not be practical throughout
this application. Is there any way to get around this issue? Xalan
processor. Stripped down stylesheet below along with XHTML output.
<?xml version='1.0'?>...
|
by: am_pcguy |
last post by:
I have a web based application for my company. We use Coldfusion, I
wanted to see if I could use Javascript to make the page a bit more
dynamic.
Right now I use the command:
<cfhttp URL="http://server:port" method="get" Timeout="20" charset="UTF-8">
<cfhttpparam name="var" type="CGI" value="command I send">
this connects to an application on another server listening on the
provided port for a request. When it sees the command a...
|
by: acoder |
last post by:
This page will link to a number of tutorials.
Coldfusion Language
Coldfusion Variables
Using Coldfusion Variables
Coldfusion Image Gallery
How to upload a file in Coldfusion
How to send mail using Coldfusion
Coldfusion Tips and Tricks
|
by: jnag |
last post by:
Hello,
I have a website with various font options (small to large) buttons
that the user can click on the banner, which runs through the site.
Site contains both static and dynamic content. I have an onclick()
event on the buttons. But, I am not sure where to put the javascript
function that will change the stylesheet accordingly and how to write
this piece of code. Any help is appreciated.
Thanks,
| |
by: jnag |
last post by:
Hello,
I have implemented styleswitcher.js on my coldfusion website.
The code looks perfectly ok, but the stylesheets are not taking
effect. Basically, nothing changes when I click on the buttons on the
banner to switch styles.
My friend has implemented the exact same thing on a basic HTML website
and it works perfectly well.
|
by: kmitchell00 |
last post by:
I am coding in Coldfusion MX7 and using Javascript for some of the functionality. The basic functionality I'm coding is, based on a value the user chooses from a dropdown box, I populate address fields with the associated data. I am using the onChange attribute of the dropdown box for the call to a Javascript function. I prepopulate a Coldfusion array with the address data and am using cfwddx to convert the Coldfusion array to a Javascript...
|
by: quest007 |
last post by:
Hi!
I have configured IIS for coldfusion and when I access my coldfusion site through localhost, the pages are served as required. But if i ty to access it from a remote machine by specifying the IP address in the url, it displays an error:
The web site you are accessing has experienced an unexpected error.
File not found: /mysite/htdocs/dsp_welcome.cfm
While searching for the error, I found a solution which suggests that it might be...
|
by: bonneylake |
last post by:
Hey Everyone,
Well i don't know if my question should be in javascript/ajax or coldfusion, i figure this is more of a coldfusion question. But if this is in the wrong section let me know an all gladly delete my question an put it in the correct section.
Well what i am trying to do is pretty simple. I have a input field and someone starts typing in a customer number. As they type in the customer number the drop down box is populated. They...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |