BookmarkSubscribeRSS Feed
jplarios
Quartz | Level 8
Hi:
I have a stored process that creates a custom html form that requires the user to submit once they have the form. This submit is created by



So I want to replace the "Click" with an image. However, I create a macro variable name ( called macrovariable, see above, created by the name attribute) that gets changed to something weird. As soon as a click happens on the click image the stored process gives me the following with no Log:

"macrovariable.x" is an invalid name because it contains characters other than alphanumerics or underscore.

This happens only when I change the input type to "image"

Any help?
4 REPLIES 4
Vince_SAS
Rhodochrosite | Level 12
Did you view the source of the resulting HTML page to insure that the NAME attribute is correct (does not contain ".x")?

Vince DelGobbo
SAS R&D
jplarios
Quartz | Level 8
Vince,
Correct. I can change the name to name="test" and I will get the error mentioned, no log, and will test.x in the error sentence.

jp
Cynthia_sas
Diamond | Level 26
Hi:
An interesting discussion here
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html

seems relevant, when it explains a LOT of the reasons you might NOT want to use an image as a SUBMIT button, and this is in one of those explanations:
beginquote

The reason to this is the way in which image submit buttons contribute to form data set: the value of the VALUE attribute is ignored, and the coordinates of the clicked location are passed instead. For example, if you have , then the form data set contains the fields foo.x and foo.y, with numeric values that indicate the x and y coordinates of the clicked location.

endquote


So it seems you're running into standard browser behavior with the suffix of .X to the name= attribute value.

cynthia
jplarios
Quartz | Level 8
Cynthia,
that might explain it. Thank you!

jp

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1595 views
  • 0 likes
  • 3 in conversation