Totally stumped with non-responding form action button.

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
nirkedar
Cave Troll
Posts: 52
Joined: Tue Sep 21, 2010 3:13 pm

Totally stumped with non-responding form action button.

Post by nirkedar »

Here's my simple code below. There is absolutely no response when I click the "Process" button. Any idea why?
PS: The Test@LIB:Token is supposed to just show me the passed form parameters (for now).

[H: FormName = upper(concat(getPlayerName(), ".", getName(), ".FORM"))]
[H: testLink = macroLinkText("Test@LIB:Token", "all")]

[dialog(FormName): {
<html>
<head>
<link rel="stylesheet" type="text/css" href="_CSS@LIB:UI">
</head>

<body>
<form action="[r: testLink]" method="json">

<tr>
<td align="center">
<input type="submit" name="FormAction" value="Process">
</td>
</tr>

</form>
</body>
</html>
}]
Last edited by Azhrei on Thu May 09, 2013 3:15 pm, edited 1 time in total.
Reason: moved to "MapTool > Macros" forum

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Totally stumped with non-responding form action button.

Post by wolph42 »

i don't see why, but you can start reading up on my debug article in my signature. Specifically the console method. Start that up and then at least you know whther the call is made or not.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Totally stumped with non-responding form action button.

Post by CoveredInFish »

I actually believe the table breaks the form. I did some other changes too but only having a correct table leads to a running example.

This should work

Code: Select all

[h: assert(hasImpersonated(), "Please select a token.")]
[h: FormName = upper( getPlayerName()+"."+getName()+".form" )]
[H: testLink = macroLinkText("Test@LIB:Token", "all", "", currentToken())]

[frame(FormName): {
<html><head></head><body>
<form action="[r: testLink]" method="json">

<table>
<tr>
<td align="center">
<input type="submit" name="FormAction" value="Process">
</td>
</tr>
</table>

</form></body></html>
}]


User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Totally stumped with non-responding form action button.

Post by aliasmask »

I don't know if the stylesheet macro name is a problem, but I would make it a valid variable name and have it start with a character, but that may not be a problem.

Post Reply

Return to “Macros”