Jump to content
  • 0

trouble with reloading a datapage using a button



I have put some HTML in a "display a message" after a submission form, I want one button to reload the page fresh/empty fields, the other button to reload the page with a few parameters passed.  For some reason when I try to do this using simple buttons anytime either of the buttons are clicked, the datapage is reloaded with errors for the required fields missing and does not pass parameters if I click on the button with the parameters.

Is this something specific to using buttons? I tested the same link as the button as just a link and it passes the parameters fine and loads like it should, its only when the buttons are used I get the error.

[@field:Gear_Item] was successfully issued to&nbsp;[@field:Name]<br />
<br />
<br />
&nbsp;<button onclick="window.location.href='https://c0ebl237.caspio.com/dp/121230003612c6470a7a405e9d82?cbResetParam=1';">Click Here to issue more gear (New employee)</button> this button gives error

<button onclick="window.location.href='https://c0ebl237.caspio.com/dp/121230003612c6470a7a405e9d82?cbResetParam=1&Name=[@field:Name]&Date_Issued=[@field:Date_Issued*]';">Click Here to issue more gear (Same Employee)</button> this button gives error

<a href="https://c0ebl237.caspio.com/dp/121230003612c6470a7a405e9d82?cbResetParam=1&Name=[@field:Name]&Date_Issued=[@field:Date_Issued*]">Test</a> this link works fine



Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Fleshzombie,

I have managed to replicate the exact behavior, it looks that when using 'window.location.href', other than our parameter, appSession get passed as well:


I however don't know if that is causing the described error.

About the difference between these two ways of using the feature, I found that 'window.location.href' is triggerable in JavaScript, and <a href=''> is just hyperlink in HTML.

More on the page:


Link to comment
Share on other sites

  • 0

Thanks for looking into it @KlisaN137.  I did notice the appsession and have never seen that before, I dont even know what causes that.


I have tried the <a href="> button as well with same result.  I can use a normal link for now, I was just trying to spruce it up a bit and figured I was doing something wrong and it was a simple fix.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...