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
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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