You are confusing server-side (CF) and client-side (JS). While you can
mix CF and JS together, you need to understand how it works. The CF is
processed in entirety before the page loads. So you can use it to insert
values into JS variables for example, or to dynamically build different
JS code. But CF cannot access client-side variables such as
document.bldginfo.Bldgnumt.value . 

JS has regular expression parsing so perhaps you can rewrite it all in
JS.

> -----Original Message-----
> From: Bruce, Rodney S HQISEC/SIGNAL
> [mailto:[EMAIL PROTECTED]]
> Sent: mercredi 10 juillet 2002 11:05
> To: CF-Talk
> Subject: OT: Javescript help
> 
> 
> Hello all
> 
> I am missing something to get this javascript to work, hoping 
> someone can
> help.
> 
> Am just trying to remove all but numbers from a form field 
> and then enter
> the new var into a differnt field.
> 
> I have tried:
> 
> <script language="JavaScript">
> function enterbldgnum() {
>       document.bldginfo.Bldgname.value =
> REReplaceNoCase(document.bldginfo.Bldgnumt.value, 
> "[:digit:]", "", "All");
> }
> 
> function enterbldgnum() {
>       x = document.bldginfo.Bldgnumt.value;
>       document.bldginfo.Bldgname.value = REReplaceNoCase(x, 
> "[:digit:]",
> "", "All");
> }
> 
> function enterbldgnum() {
>       x = REReplaceNoCase("22we445rt", "[:digit:]", "", "All");
>       document.bldginfo.Bldgname.value = x;
> }
> 
> function enterbldgnum() {
>       x = document.bldginfo.Bldgnumt.value;
>       REReplaceNoCase(x, "[:digit:]", "", "All");
>       document.bldginfo.Bldgname.value = x;
> }
> 
> </script>
> 
> All get the same error "object expected", for the 
> REReplaceNoCase line.
> this simple check works(just making sure all my names were 
> good and function
> was being called)
> 
> function enterbldgnum() {
>       document.bldginfo.Bldgname.value = 
> document.bldginfo.Bldgnumt.value;
> }
> 
> 
> What am I missing?
> Thanks
> Rodney
> 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to