| View previous topic :: View next topic |
| Author |
Message |
Jeremiah
Joined: 20 Apr 2009 Posts: 797 Location: North Dakota, USA
|
Posted: Thu Mar 11, 2010 10:52 pm Post subject: iWeb_SetDomObj - Dollar amounts |
|
|
Hello. I'm using iWeb_SetDomObj to fill in a field on a web page. The information is a dollar amount coming from a variable. Here is a snippet of the code...
| Code: | ORTOT = %clipboard%
;
;
;
iWeb_setDomObj(pwb,"txttotalamount", ORTOT )
;
;
; |
Now, This works, but the iWeb does not like commas in the dollar amount. I have tested this and have come to that conclusion. When my clipboard contains an amount without commas, it will fill the field correctly 100% of the time. Any ideas as to what is going on here? Thanks! _________________ -Jeremiah |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu Mar 11, 2010 11:19 pm Post subject: |
|
|
| Code: | | StringReplace,ORTOT ,ORTOT ,`,,,,all | do stinking stuff #@$%^&*() i forgot i have to do some crazy things to get this to display right _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Last edited by tank on Fri Mar 12, 2010 5:19 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jeremiah
Joined: 20 Apr 2009 Posts: 797 Location: North Dakota, USA
|
Posted: Fri Mar 12, 2010 3:25 am Post subject: |
|
|
Great thanks! Though, why so many commas? _________________ -Jeremiah |
|
| Back to top |
|
 |
Jeremiah
Joined: 20 Apr 2009 Posts: 797 Location: North Dakota, USA
|
Posted: Fri Mar 12, 2010 2:32 pm Post subject: |
|
|
Actually, I spoke too soon. I need the commas in the string. The are present until it inputs it into the web app. Any idea as to why? _________________ -Jeremiah |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Fri Mar 12, 2010 5:19 pm Post subject: |
|
|
uts an html entity and i forgot i had to go thru extra effor tot get it to appear correctly within the forum i have made correction above _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Jeremiah
Joined: 20 Apr 2009 Posts: 797 Location: North Dakota, USA
|
Posted: Fri Mar 12, 2010 7:02 pm Post subject: |
|
|
I think either it didn't display correctly again, or I might not be using it correctly. I've been using an example number of "$1,000,000.00" -- This number is always getting put into the field as "$1" When I applied your first stringreplace line, it worked, only the commas were missing but the period was there. Your latest example was doing just the "$1" amount again. Sorry to keep coming back with this, but I just want it to work and I can't figure it out. I've put various msgboxes in my code to check the variable, and the commas and periods exist all the way up to when it actually ueses iweb to put in the variable into the field. Any other thoughts? _________________ -Jeremiah |
|
| Back to top |
|
 |
Jeremiah
Joined: 20 Apr 2009 Posts: 797 Location: North Dakota, USA
|
Posted: Fri Mar 12, 2010 8:11 pm Post subject: |
|
|
Here's what I ended up doing. Not sure if it's a desired method, but it works.
| Code: | Clipboard = %ORTOT%
COM_Invoke(pwb, "document.all.txttotalamount.focus")
Send, ^v |
Thanks for the replies. _________________ -Jeremiah |
|
| Back to top |
|
 |
|